LoginPresenter implements Presenter { public void initialize(LoginView loginView) { this.loginView = loginView; this.showViewLoginForm(); } @Inject  LoginPresenter(@Token StringPreference token); void initialize(LoginView loginView); void onStartLoadingOAuthPage(String url);  }
@Test public void shouldShowLoginIfTokenExists() throws Exception { when(token.isSet()).thenReturn(true); when(token.get()).thenReturn(TOKEN_STUB); presenter.initialize(loginView); verify(loginView, times(1)).showOAuthLoginForm(anyString()); }