Another method to test whether or not M1 is equivalent to M2 is to find out if:
For this, complement M2, and construct an automata that accepts both the intersection of language accepted by M1 and the complement of M2. If this automata accepts an empty set, then it means that there is no string acceptable to M1 that is not acceptable to M2. Similarly, construct an automata that accepts the intersection of language accepted by M2 and the complement of M1. If this automata accepts an empty set, then it means that there is no string acceptable to M2 that is not acceptable to M1. Hence, the language accepted by M1 is same as the language accepted by M2.