}
public void testReadOnlySession() throws NotExecutableException, RepositoryException {
javax.jcr.Session s = getHelper().getReadOnlySession();
try {
RetentionManager rmgr = getRetentionManager(s);
try {
rmgr.getHolds(testNodePath);
fail("Read-only session doesn't have sufficient privileges to retrieve holds.");
} catch (AccessDeniedException e) {
// success
}
try {
rmgr.addHold(testNodePath, getHoldName(), false);
fail("Read-only session doesn't have sufficient privileges to retrieve holds.");
} catch (AccessDeniedException e) {
// success
}
} finally {