ContentSession testSession = createTestSession();
try {
Root r = testSession.getLatestRoot();
Root immutableRoot = new ImmutableRoot(r, TreeTypeProvider.EMPTY);
PermissionProvider pp = new PermissionProviderImpl(testSession.getLatestRoot(), testSession.getAuthInfo().getPrincipals(), getSecurityProvider());
assertFalse(r.getTree("/").exists());
assertSame(ReadStatus.DENY_THIS, pp.getReadStatus(immutableRoot.getTree("/"), null));
for (String path : READ_PATHS) {
assertTrue(r.getTree(path).exists());
assertSame(ReadStatus.ALLOW_ALL_REGULAR, pp.getReadStatus(immutableRoot.getTree(path), null));
}
} finally {
testSession.close();
}
}