EasyMock - do you have to reset() mocks after test?

Viewed 7365

I think the answer is yes, but I was unable to find anything definite in the easymock documentation.

I'm getting an error when first test is mocking a class, and then another test is using this class in a regular way. The class turns out to be mocked in the second test and fails with unexpected invocation.

Is there a way to automate the cleanup, besides using the EasyMockSupport and calling resetAll() in @After method (preferably something that doesn't have to be repeated in each class)?

2 Answers
Related