mockito java example
Example 1: mockito new Mock()
TestedClass tc = spy(new TestedClass());
LoginContext lcMock = mock(LoginContext.class);
when(tc.login(anyString(), anyString())).thenReturn(lcMock);
Example 2: add mockito to java project
org.mockito
mockito-inline
3.7.7