Recommended solutions based on your search
Check your pattern declaration or check your assert declaration.
My guess is there is some kind of static state in the code being tested or in the test itself, so the tests aren't isolated. Adding the test changes the test order. In any case, your best course of action is to use the debugger to see why the tests fail.
Solutions on the web
java.lang.AssertionError: expected:<1> but was:<2>