test void method mockito code example Example: java doreturn void doNothing().when(yourMock).yourMockedMethod();