return auth;
}
@Test
public void testAuthenticate() throws Exception {
IAuthenticationManager auth = newAuthenticationManager();
UserModel user = new UserModel("sunnyjim");
user.password = "password";
users.updateUserModel(user);
assertNotNull(auth.authenticate(user.username, user.password.toCharArray()));
user.disabled = true;
users.updateUserModel(user);
assertNull(auth.authenticate(user.username, user.password.toCharArray()));
users.deleteUserModel(user);
}