    @Test
    public void loginSuccess() throws Exception {

        String pass = "abc";
        User user = sampleUser(1L);
        String token = StringUtils.getBasicAuth(user.getLogin(), pass);

        when(githubService.login(any())).thenReturn(successResponse(user));

        when(userManager.startUserSession(any(), any())).thenReturn(null);

        viewModel.setUserName(user.login);
        viewModel.setPassword(pass);
        viewModel.login();

        verify(stateLiveData, times(1)).setValue(State.loading(null));
        verify(stateLiveData, times(1)).setValue(State.success(null));

        verify(userManager).startUserSession(user, token);
        verify(mNavigatorHelper).navigateMainActivity(true);
    }