fail("old password didn't match -> changePassword(String,String) should fail.");
} catch (RepositoryException e) {
// success.
}
user.changePassword("pw", oldPw);
superuser.save();
// make sure the user can login with the new pw
Session s = getHelper().getRepository().login(new SimpleCredentials(user.getID(), "pw".toCharArray()));
s.logout();