mock implementation with mockito code 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: generate mockito mocks
$ flutter pub run build_runner build