LoginPresenter extends AbstractPresenter<ILoginView> { public void onLoginChanged(@NonNull String newLogin) { logger.debug("onLoginChanged() called with: newLogin = [{}]", newLogin); if (TextUtils.notEquals(login, newLogin)) { login = newLogin; hasLoginError = false; getView().setLoginErrorVisible(hasLoginError); updateLoginButton(); } } @Inject  LoginPresenter(AccountModule accountModule, LoginModule loginModule,
                          @Named(VIEW_EXECUTOR) Executor executor); @Override void onCreate(); @Override void onBind(ILoginView view); @Override void onDestroy(); void onLoginChanged(@NonNull String newLogin); void onPasswordChanged(@NonNull String newPassword); void onLoginClick(); void onRememberCheck(boolean checked);  }
@Test public void loginErrorClearedOnNewLogin() { initPresenter(); reset(view); presenter.onLoginChanged("value"); verify(view).setLoginErrorVisible(false); }