junit for void method using mockito example Example: java doreturn void doNothing().when(yourMock).yourMockedMethod();