Tests Behave Differently in Eclipse and on Command Line
They might behave differently because they usually run together when running on command line, and individually in Eclipse.
If using Spring, you need to use
@DirtiesContext to rebuild the Spring context if one class has dirtied it, e.g. by setting up a mock object which then affects a later running test.