actionSet.add(actionAttr);
//Create the environment set
Set environSet = new HashSet();
RequestCtx request = new RequestCtx(subjectSet, resourceSet, actionSet, environSet);
assertNotNull("XACML Request != null", request);
//Log the request for viewing
if (DEBUG)
XACMLUtil.logRequest(request);
//Test the request contents
Set subjects = request.getSubjects();
assertTrue("We have one subject?", subjects.size() == 1);
Subject subj = (Subject) (subjects.iterator().next());
assertNotNull("Subject != null", subj);
assertEquals("Attributes in subject match", subjectAttr, (Attribute) (subj.getAttributes().iterator().next()));
//Test the resource attributes
Set resources = request.getResource();
assertTrue("# of resources = 1", resources.size() == 1);
assertEquals("Attributes in resources match", resourceAttr, (Attribute) (resources.iterator().next()));
//Test the action attributes
Set actions = request.getAction();
assertTrue("# of actions = 1", actions.size() == 1);
assertEquals("Attributes in actions match", actionAttr, (Attribute) (actions.iterator().next()));
}