@Test
public void should_login_offline_when_fail() {

    LoginService.LoginCallback loginCallback = mock(LoginService.LoginCallback.class);
    when(userDao.getUser(anyString(), anyString())).thenReturn(null);
    loginService.loginOffline(username, password, expectedUrl, loginCallback);
    verify(loginCallback, times(1)).onFailed(null);
    verify(userDao, times(1)).getUser(username, expectedUrl);
}