Consider this code snippet:-
Whatever mock = EasyMock.createMock( Whatever.class );
mock.doSomething();
EasyMock.expectLastCall(); // <- Does this do anything?
EasyMock.replay( whatever );
Does expectLastCall()
here actually do anything? Adding or removing this line from my test appears to make no difference.
Obviously it is useful if you add .andThrow
or .atLeastOnce()
, etc. to the call. That is not what I'm asking about.