Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/46/d158246649/htdocs/blogs/chwalisz/wp-includes/pomo/plural-forms.php on line 210
Mockito and void methods on mock objects | Dave Page

SO I have
class TestFoo {

}
TestFoo s1 = Mockito.mock(TestFoo.class);
TestFoo s2 = Mockito.mock(TestFoo.class);

The Mockito doc “Real Partial Mocks” says to do this:

when(mock.someMethod()).thenCallRealMethod();

we get the error

“The method when(T) in the type Mockito is not applicable for the arguments (void)”

After 1/2 hour of hunting I found a hint, and refactored:

Mockito.doCallRealMethod().when(s1).assertEquals(s2);