}
public void testAddAggregatePrivilege() throws NotExecutableException, RepositoryException {
checkCanModifyAc(path);
Privilege aggregate = null;
for (int i = 0; i < privs.length; i++) {
if (privs[i].isAggregate()) {
aggregate = privs[i];
break;
}
}
if (aggregate == null) {
throw new NotExecutableException("No aggregate privilege supported at " + path);
}
AccessControlList acl = getList(acMgr, path);
acl.addAccessControlEntry(testPrincipal, new Privilege[] {aggregate});
// make sure all privileges are present now
List privs = currentPrivileges(acl, testPrincipal);
assertTrue("Privileges added through 'addAccessControlEntry' must be " +
"reflected upon getAccessControlEntries",
privs.contains(aggregate) || privs.containsAll(Arrays.asList(aggregate.getAggregatePrivileges())));
}