EasyMock: Add one more expectation after replay

Konstantin Milyutin picture Konstantin Milyutin · Aug 27, 2011 · Viewed 7.6k times · Source

Is it possible to add expectation after having mock object replayed?

Answer

Tom picture Tom · Aug 28, 2011

It is possible to reset a mock object and apply new expectations to it before replaying it again.

EasyMock.reset(myMock)

See the EasyMock documentation for more information.