How to mock methods with void return type?
I implemented an observer pattern but I can\'t mock it with Mockito because I don\'t know how.
And I tried to fin
I think I've found a simpler answer to that question, to call the real method for just one method (even if it has a void return) you can do this:
Mockito.doCallRealMethod().when().(); .();
Or, you could call the real method for all methods of that class, doing this:
= mock(.class, Mockito.CALLS_REAL_METHODS);