@Test public void loginPasswordInvalid() throws Exception { final Authentication request = new UsernamePasswordAuthenticationToken( username, password); Mockito.when(manager.authenticate(request)).thenThrow( new BadCredentialsException("")); setCredentials(username, password); loginBean.login(null); verifyMessage(AdministratorLoginBean.INVALID_LOGIN); verifyLoginManager(); }
public String login() { return isSuccess ? INDEX_PAGE : LOGIN_PAGE; }
AdministratorLoginBean implements Serializable { public String login() { return isSuccess ? INDEX_PAGE : LOGIN_PAGE; } }
AdministratorLoginBean implements Serializable { public String login() { return isSuccess ? INDEX_PAGE : LOGIN_PAGE; }  }
AdministratorLoginBean implements Serializable { public String login() { return isSuccess ? INDEX_PAGE : LOGIN_PAGE; }  String login(); void login(final ActionEvent ae); void setAdminAuthManager(final AuthenticationManager adminAuthManager); String getUsername(); void setUsername(final String username); String getPassword(); void setPassword(final String password); }
AdministratorLoginBean implements Serializable { public String login() { return isSuccess ? INDEX_PAGE : LOGIN_PAGE; }  String login(); void login(final ActionEvent ae); void setAdminAuthManager(final AuthenticationManager adminAuthManager); String getUsername(); void setUsername(final String username); String getPassword(); void setPassword(final String password); static final String EMPTY_FIELD_MESSAGE; static final String INVALID_LOGIN_MESSAGE; }