// create user upfront in order to test update mode
ExternalUser externalUser = TestLoginModule.externalUser;
Authorizable user = userManager.createUser(externalUser.getId(), externalUser.getPassword());
root.commit();
ContentSession cs = null;
try {
cs = login(new SimpleCredentials(userId, new char[0]));
root.refresh();
for (String id : ids) {
if (id.equals(userId)) {
Authorizable a = userManager.getAuthorizable(id);
assertNotNull(a);
for (String prop : TestLoginModule.externalUser.getProperties().keySet()) {
assertTrue(a.hasProperty(prop));
}
} else {
assertNotNull(userManager.getAuthorizable(id));
}
}
} finally {
if (cs != null) {
cs.close();
}
options.clear();
}
}