@Test
public void refreshCognitoTokenReturnsNullUserResponse() {

    Mockito.when(meResponse.getUser()).thenReturn(null);
    Mockito.when(identityManager.getMe()).thenReturn(Observable.just(meResponse));
    TestObserver<Optional<Cognito>> testObserver = cognitoIdentityProvider.refreshCognitoToken().test();
    Mockito.verify(localCognitoTokenStore, Mockito.times(2)).persist(null);
    testObserver.assertValue(Optional.absent())
            .assertComplete()
            .assertNoErrors();
}