"<security-constraint><users>manager,admin</users><permissions>view,help</permissions></security-constraint>" +
"</security-constraints-def>";
runTest(xml, defName, method);
PageSecurity pageSecurity = pageManager.getPageSecurity();
SecurityConstraintsDef def = pageSecurity.getSecurityConstraintsDef(defName);
assertNotNull("definition " + defName + " not found ", def);
SecurityConstraint constraint = (SecurityConstraint)def.getSecurityConstraints().get(0);
assertNotNull("first constraint for " + defName + " not found ", constraint);
assertEquals("update failed for constraints " + constraint.getPermissions().toString(), constraint.getPermissions().toString(), "[view, edit, help]");
assertEquals("update failed for constraints " + constraint.getRoles().toString(), constraint.getRoles().toString(), "[user, manager, anon]");
SecurityConstraint constraint2 = (SecurityConstraint)def.getSecurityConstraints().get(1);
assertNotNull("second constraint for " + defName + " not found ", constraint2);
assertEquals("add failed for constraints " + constraint2.getPermissions().toString(), constraint2.getPermissions().toString(), "[view, edit, help]");
assertEquals("add failed for constraints " + constraint2.getGroups().toString(), constraint2.getGroups().toString(), "[accounting, finance]");
SecurityConstraint constraint3 = (SecurityConstraint)def.getSecurityConstraints().get(2);
assertNotNull("third constraint for " + defName + " not found ", constraint3);
assertEquals("add failed for constraints " + constraint3.getPermissions().toString(), constraint3.getPermissions().toString(), "[view]");
assertEquals("add failed for constraints " + constraint3.getUsers().toString(), constraint3.getUsers().toString(), "[tomcat]");
SecurityConstraint constraint4 = (SecurityConstraint)def.getSecurityConstraints().get(3);
assertNotNull("fourth constraint for " + defName + " not found ", constraint4);
assertEquals("add failed for constraints " + constraint4.getPermissions().toString(), constraint4.getPermissions().toString(), "[view, help]");
assertEquals("add failed for constraints " + constraint4.getUsers().toString(), constraint4.getUsers().toString(), "[manager, admin]");
}