}
@Test
public void testValidator() throws Exception{
// test spring
MasterPasswordChangeRequest r = new MasterPasswordChangeRequest();
checkCurrentPassword(r);
r.setCurrentPassword("geoserver".toCharArray());
//r.setCurrentPassword(getMasterPassword().toCharArray());
checkConfirmationPassword(r);
r.setConfirmPassword("abc".toCharArray());
checkNewPassword(r);
r.setNewPassword("def".toCharArray());
checkConfirmationEqualsNewPassword(r);
r.setNewPassword("abc".toCharArray());
validateAgainstPolicy(r);
r.setConfirmPassword(r.getCurrentPassword());
r.setNewPassword(r.getCurrentPassword());
checkCurrentEqualsNewPassword(r);
r.setConfirmPassword((new String(r.getCurrentPassword())+"1").toCharArray());
r.setNewPassword((new String(r.getCurrentPassword())+"1").toCharArray());
validator.validateChangeRequest(r);
}