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