public void testRepoACL() throws RepositoryException, IOException, PackageException {
removeRepoACL();
JcrPackage pack = packMgr.upload(getStream("testpackages/repo_policy.zip"), false);
assertNotNull(pack);
ImportOptions opts = getDefaultOptions();
opts.setAccessControlHandling(AccessControlHandling.OVERWRITE);
pack.install(opts);
// test if nodes and ACLs of first package exist
assertPermission(null, false, new String[]{"jcr:all"}, "everyone", null);
assertPermission(null, false, new String[]{"jcr:all"}, "testuser", null);
pack = packMgr.upload(getStream("testpackages/repo_no_policy.zip"), true);
assertNotNull(pack);
opts = getDefaultOptions();
opts.setAccessControlHandling(AccessControlHandling.OVERWRITE);
pack.install(opts);
assertPermissionMissing(null, false, new String[]{"jcr:all"}, "everyone", null);
assertPermissionMissing(null, false, new String[]{"jcr:all"}, "testuser", null);