PrivilegeBits writeBits = getPrivilegeManagerImpl().getBits(privilegesFromNames(names));
Set<Privilege> pvs = getPrivilegeManagerImpl().getPrivileges(writeBits);
assertTrue(pvs != null);
assertTrue(pvs.size() == 1);
Privilege p = pvs.iterator().next();
assertSamePrivilegeName(p.getName(), PrivilegeRegistry.REP_WRITE);
assertTrue(p.isAggregate());
names = new String[] {
PrivilegeRegistry.REP_WRITE,
Privilege.JCR_WRITE
};
writeBits = getPrivilegeManagerImpl().getBits(privilegesFromNames(names));
pvs = getPrivilegeManagerImpl().getPrivileges(writeBits);
assertTrue(pvs != null);
assertTrue(pvs.size() == 1);
p = pvs.iterator().next();
assertSamePrivilegeName(p.getName(), PrivilegeRegistry.REP_WRITE);
assertTrue(p.isAggregate());
assertTrue(p.getDeclaredAggregatePrivileges().length == names.length);
}