* reflects changes made to the namespace prefix.
*
* @throws RepositoryException If an error occurs.
*/
public void testPrivilegeName() throws RepositoryException {
Privilege allPriv = acMgr.privilegeFromName(Privilege.JCR_ALL);
try {
String remappedPrefix = "_jcr";
superuser.setNamespacePrefix(remappedPrefix, "http://www.jcp.org/jcr/1.0");
List l = new ArrayList();
l.add(acMgr.privilegeFromName(Privilege.JCR_ALL));
l.add(acMgr.privilegeFromName(remappedPrefix + ":all"));
for (Iterator it = l.iterator(); it.hasNext();) {
Privilege p = (Privilege) it.next();
assertEquals("The privilege name must reflect the modified namespace prefix.",remappedPrefix + ":all", p.getName());
assertEquals("jcr:all privileges must be equal.",allPriv, p);
}
try {
acMgr.privilegeFromName("jcr:all");