how to mock void method call in mockito code example Example: java doreturn void doNothing().when(yourMock).yourMockedMethod();