@Test public void givenDifferentNewPasswordsShouldSendErrorMessageTest() throws Exception { sut.setPassword(NEW_PASSWORD); sut.setPasswordRepe(NEW_PASSWORD + "INVALID"); final String result = sut.changePassword(); assertThat(result, is(nullValue())); verify(sut).addErrorMessage("error.newPasswordsNotEquals"); }
@Override public String changePassword() { User user = authMgr.getCurrentPrincipal().getUser(); if (user.isLdapAuthentication()) { setPasswordOld(user.getLdapPassword()); } else { setPasswordOld(user.getPassword()); } return super.changePassword(); }
ExpiredPasswordBean extends AbstractPasswordBean { @Override public String changePassword() { User user = authMgr.getCurrentPrincipal().getUser(); if (user.isLdapAuthentication()) { setPasswordOld(user.getLdapPassword()); } else { setPasswordOld(user.getPassword()); } return super.changePassword(); } }
ExpiredPasswordBean extends AbstractPasswordBean { @Override public String changePassword() { User user = authMgr.getCurrentPrincipal().getUser(); if (user.isLdapAuthentication()) { setPasswordOld(user.getLdapPassword()); } else { setPasswordOld(user.getPassword()); } return super.changePassword(); }  }
ExpiredPasswordBean extends AbstractPasswordBean { @Override public String changePassword() { User user = authMgr.getCurrentPrincipal().getUser(); if (user.isLdapAuthentication()) { setPasswordOld(user.getLdapPassword()); } else { setPasswordOld(user.getPassword()); } return super.changePassword(); }  @Override String changePassword(); @Override String returnError(Exception ex); }
ExpiredPasswordBean extends AbstractPasswordBean { @Override public String changePassword() { User user = authMgr.getCurrentPrincipal().getUser(); if (user.isLdapAuthentication()) { setPasswordOld(user.getLdapPassword()); } else { setPasswordOld(user.getPassword()); } return super.changePassword(); }  @Override String changePassword(); @Override String returnError(Exception ex);  }