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