protected JettyWebAppContext setUpSecureAppContext(Map roleDesignates, Map principalRoleMap, ComponentPermissions componentPermissions, DefaultPrincipal defaultPrincipal, PermissionCollection checked, Set securityRoles) throws Exception {
String policyContextId = "TEST";
PrincipalRoleMapper roleMapper = new ApplicationPrincipalRoleConfigurationManager(principalRoleMap);
Map contextIDToPermissionsMap = new HashMap();
contextIDToPermissionsMap.put(policyContextId, componentPermissions);
ApplicationPolicyConfigurationManager jacc = new ApplicationPolicyConfigurationManager(contextIDToPermissionsMap, roleDesignates, cl, roleMapper);
jacc.doStart();
FormAuthenticator formAuthenticator = new FormAuthenticator();
formAuthenticator.setLoginPage("/auth/logon.html?param=test");
formAuthenticator.setErrorPage("/auth/logonError.html?param=test");
return setUpAppContext("Test JAAS Realm",