testing using mockito code example
Example 1: generate mockito mocks
$ flutter pub run build_runner build
Example 2: mockito new Mock()
TestedClass tc = spy(new TestedClass());
LoginContext lcMock = mock(LoginContext.class);
when(tc.login(anyString(), anyString())).thenReturn(lcMock);