}
}
}
public void testCreateUserWithIntermediatePath() throws RepositoryException, NotExecutableException {
UserManager umgr = getUserManager(otherSession);
UserImpl u = null;
// create a new user with intermediate-path
// -> must succeed and user must be created
// -> intermediate path must be part of the nodes path
Principal p = getTestPrincipal();
String usersPath = ((UserManagerImpl) umgr).getUsersPath();
Map<String, String> m = new HashMap<String, String>();
m.put("/some/intermediate/path", usersPath + "/some/intermediate/path/" + p.getName());
m.put("some/intermediate/path", usersPath + "/some/intermediate/path/" + p.getName());
m.put("/", usersPath + "/" + p.getName());
m.put("", usersPath + "/" + p.getName());
m.put(usersPath + "/some/intermediate/path", usersPath + "/some/intermediate/path/" + p.getName());
for (String intermediatePath : m.keySet()) {
try {
u = (UserImpl) umgr.createUser(p.getName(), buildPassword(p), p, intermediatePath);
save(otherSession);
String expPath = m.get(intermediatePath);
assertEquals(expPath, u.getNode().getPath());
} finally {