AbstractAccessControlManager implements JackrabbitAccessControlManager, AccessControlConstants { @Nullable protected String getOakPath(@Nullable String jcrPath) throws RepositoryException { if (jcrPath == null) { return null; } else { String oakPath = namePathMapper.getOakPath(jcrPath); if (oakPath == null || !PathUtils.isAbsolute(oakPath)) { throw new RepositoryException("Failed to resolve JCR path " + jcrPath); } return oakPath; } } protected  AbstractAccessControlManager(@NotNull Root root,
                                           @NotNull NamePathMapper namePathMapper,
                                           @NotNull SecurityProvider securityProvider); @NotNull @Override Privilege[] getSupportedPrivileges(@Nullable String absPath); @NotNull @Override Privilege privilegeFromName(@NotNull String privilegeName); @Override boolean hasPrivileges(@Nullable String absPath, @Nullable Privilege[] privileges); @NotNull @Override Privilege[] getPrivileges(@Nullable String absPath); @Override boolean hasPrivileges(@Nullable String absPath, @NotNull Set<Principal> principals, @Nullable Privilege[] privileges); @NotNull @Override Privilege[] getPrivileges(@Nullable String absPath, @NotNull Set<Principal> principals);  }
@Test public void testGetOakPathNull() throws Exception { assertNull(acMgr.getOakPath(null)); }
@Test(expected = RepositoryException.class) public void testGetOakPathNotAbsolute() throws Exception { acMgr.getOakPath("a/rel/path"); }
@Test(expected = RepositoryException.class) public void testGetOakPathInvalid() throws Exception { NamePathMapper np = new NamePathMapper.Default() { @Override public String getOakPath(String jcrPath) { return null; } }; createAccessControlManager(root, np).getOakPath("/any/abs/path"); }