}
public void testRemoveAccessControlEntryIsTransient() throws NotExecutableException, RepositoryException {
checkCanModifyAc(path);
AccessControlList acl = getList(acMgr, path);
// make sure an ACE is present and modifications are persisted.
if (acl.addAccessControlEntry(testPrincipal, privs)) {
acMgr.setPolicy(path, acl);
superuser.save();
} else {
throw new NotExecutableException();
}
// retrieve ACL again -> transient removal of the ace
acl = getList(acMgr, path);
AccessControlEntry ace = acl.getAccessControlEntries()[0];
acl.removeAccessControlEntry(ace);
acMgr.setPolicy(path, acl);
// revert changes -> removed entry must be present again.
superuser.refresh(false);
List entries = Arrays.asList(getList(acMgr, path).getAccessControlEntries());