createUser(TEST_USER, TEST_PASSWORD);
}
@SuppressWarnings("unchecked")
private User createUser(String username, String password) {
User user = (User) m_userAdmin.createRole(username, Role.USER);
if (user != null) {
Dictionary properties = user.getProperties();
if (properties != null) {
properties.put("username", username);
}
else {
m_log.log(LogService.LOG_ERROR, "Could not get properties for " + username);
}
Dictionary credentials = user.getCredentials();
if (credentials != null) {
credentials.put("password", password);
}
else {
m_log.log(LogService.LOG_ERROR, "Could not get credentials for " + username);