// verify that the permission provider still exposes the correct privilege
// (jcr:all) for the given childPath irrespective of the dynamic nature of
// the privilege bits in the persisted permission entry.
Set<Principal> principalSet = ImmutableSet.<Principal>of(EveryonePrincipal.getInstance());
PermissionProvider permissionProvider = getConfig(AuthorizationConfiguration.class).getPermissionProvider(root, root.getContentSession().getWorkspaceName(), principalSet);
Tree childTree = root.getTree(childPath);
assertTrue(permissionProvider.hasPrivileges(childTree, PrivilegeConstants.JCR_ALL));
assertTrue(permissionProvider.getPrivileges(childTree).contains(PrivilegeConstants.JCR_ALL));
// also verify the permission evaluation
long diff = Permissions.diff(Permissions.ALL, Permissions.REMOVE_NODE|Permissions.ADD_NODE);
assertFalse(permissionProvider.isGranted(childTree, null, Permissions.REMOVE_NODE));
assertFalse(permissionProvider.isGranted(childTree, null, Permissions.ADD_NODE));
assertTrue(permissionProvider.isGranted(childTree, null, diff));
// remove the ACE again
acl = AccessControlUtils.getAccessControlList(acMgr, childPath);
for (AccessControlEntry ace : acl.getAccessControlEntries()) {
if (EveryonePrincipal.NAME.equals(ace.getPrincipal().getName())) {