Is there any good feature in EasyMock that is not there or not properly handled (as compared to EasyMock) in Mockito?
I would like to know about some feature like for eg. Mockito supports easy injection of all mocks into the Class Under Test by using the @ InjectMocks, which is not the case in EasyMock (out of the box). Similarly are there any features in EasyMock which are either not there or not handled as good as in EasyMock?
One feature that comes to mind is the support for implicitly verified expectations, which Mockito lacks:
Note the duplicate invocation to
registerXyz("xyz")in the second test. Mockito could perhaps add atimes(n)method to be used together with calls tothenReturn(...)(which EasyMock has). This would avoid having to duplicate code in situations like this.