mockito mock void code example
Example 1: java doreturn void
doNothing().when(yourMock).yourMockedMethod();
Example 2: mockito new Mock()
TestedClass tc = spy(new TestedClass());
LoginContext lcMock = mock(LoginContext.class);
when(tc.login(anyString(), anyString())).thenReturn(lcMock);