@Test
public void onResumeRestoresCachedPayloadAndConsumesResultsOnError() {

    when(uiIndicator.getState()).thenReturn(UiIndicator.State.Error);
    when(interactor.getLastUserCredentialsPayload()).thenReturn(Maybe.just(userCredentialsPayload));
    presenter.subscribe();
    verify(view).present(UiIndicator.idle());
    verify(view).present(uiIndicator);
    verify(interactor).onLoginResultsConsumed();
}