### Eclipse Workspace Patch 1.0 #P oak-jcr Index: src/test/java/org/apache/jackrabbit/oak/jcr/security/privilege/PrivilegeManagerTest.java =================================================================== --- src/test/java/org/apache/jackrabbit/oak/jcr/security/privilege/PrivilegeManagerTest.java (revision 1527504) +++ src/test/java/org/apache/jackrabbit/oak/jcr/security/privilege/PrivilegeManagerTest.java (working copy) @@ -25,6 +25,8 @@ import javax.jcr.security.AccessControlException; import javax.jcr.security.Privilege; +import junit.framework.Assert; + import com.google.common.collect.ImmutableSet; import org.apache.jackrabbit.api.security.authorization.PrivilegeManager; import org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeConstants; @@ -65,6 +67,17 @@ assertTrue(set.isEmpty()); } + + @Test + public void testNotExistingGetPrivilege() throws RepositoryException { + String nonExistingPrivilegeName = "{http://www.nonexsiting.com/1.0}nonexisting"; + try{ + privilegeManager.getPrivilege(nonExistingPrivilegeName); + } catch(AccessControlException e){ + //expected + } + } + @Test public void testGetPrivilege() throws RepositoryException { Set aggregatedPrivilegeNames = ImmutableSet.of("jcr:read",