public void testParsing() throws Exception {
roleSet.add("Admin");
URL srcXml = classLoader.getResource("security/web1.xml");
WebAppDocument webAppDoc = WebAppDocument.Factory.parse(srcXml, options);
WebAppType webAppType = webAppDoc.getWebApp();
ComponentPermissions permissions = builder.buildSpecSecurityConfig(webAppType, roleSet, rolePermissionMap);
PermissionCollection unchecked = permissions.getUncheckedPermissions();
assertTrue(unchecked.implies(new WebResourcePermission("/login.do", "!")));
assertTrue(unchecked.implies(new WebResourcePermission("/foo", "!")));
assertFalse(unchecked.implies(new WebResourcePermission("/foo.do", "!")));
PermissionCollection adminPermissions = permissions.getRolePermissions().get("Admin");
assertTrue(adminPermissions.implies(new WebResourcePermission("foo.do", "GET,POST")));
}