assertNotNull(pageManager.getLinks(folder));
assertEquals(1, pageManager.getLinks(folder).size());
PageSecurity pageSecurity = pageManager.newPageSecurity();
List constraintsDefs = new ArrayList(2);
SecurityConstraintsDef constraintsDef = pageManager.newSecurityConstraintsDef();
constraintsDef.setName("public-view");
List defConstraints = new ArrayList(1);
SecurityConstraint defConstraint = pageSecurity.newSecurityConstraint();
defConstraint.setUsers(Shared.makeListFromCSV("*"));
defConstraint.setPermissions(Shared.makeListFromCSV("view"));
defConstraints.add(defConstraint);
constraintsDef.setSecurityConstraints(defConstraints);
constraintsDefs.add(constraintsDef);
constraintsDef = pageSecurity.newSecurityConstraintsDef();
constraintsDef.setName("admin-all");
defConstraints = new ArrayList(2);
defConstraint = pageSecurity.newSecurityConstraint();
defConstraint.setRoles(Shared.makeListFromCSV("admin"));
defConstraint.setPermissions(Shared.makeListFromCSV("view,edit"));
defConstraints.add(defConstraint);
defConstraint = pageSecurity.newSecurityConstraint();
defConstraint.setRoles(Shared.makeListFromCSV("nobody"));
defConstraints.add(defConstraint);
constraintsDef.setSecurityConstraints(defConstraints);
constraintsDefs.add(constraintsDef);
pageSecurity.setSecurityConstraintsDefs(constraintsDefs);
List globalConstraintsRefs = new ArrayList(2);
globalConstraintsRefs.add("admin-all");
globalConstraintsRefs.add("public-view");