You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openaz.apache.org by co...@apache.org on 2015/05/05 14:23:16 UTC

[18/54] [abbrv] [partial] incubator-openaz git commit: Do an eclipse based "cleanup" on the project

http://git-wip-us.apache.org/repos/asf/incubator-openaz/blob/38b6d318/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/TestBase.java
----------------------------------------------------------------------
diff --git a/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/TestBase.java b/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/TestBase.java
index 9b16d61..f1ef6b1 100644
--- a/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/TestBase.java
+++ b/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/TestBase.java
@@ -92,16 +92,12 @@ import com.google.common.base.Splitter;
 import com.google.common.collect.Lists;
 
 /**
- * This is a base class for setting up a test environment. Using properties files, it contains the
- * necessary information for
- * 1. defining and providing attributes
- * 2. defining and instantiating the PDP engine
- * 3. creating PEP requests and calling the PDP engine
- *
- *
+ * This is a base class for setting up a test environment. Using properties files, it contains the necessary
+ * information for 1. defining and providing attributes 2. defining and instantiating the PDP engine 3.
+ * creating PEP requests and calling the PDP engine
  */
 public class TestBase extends SimpleFileVisitor<Path> {
-    private static final Log logger     = LogFactory.getLog(TestBase.class);
+    private static final Log logger = LogFactory.getLog(TestBase.class);
 
     public class HelpException extends Exception {
         private static final long serialVersionUID = 1L;
@@ -109,11 +105,9 @@ public class TestBase extends SimpleFileVisitor<Path> {
     }
 
     /**
-     * This private class holds information for properties defined for attribute
-     * generation. The user can configure the properties file such that attributes
-     * can be automatically generated and added into each request.
-     *
-     *
+     * This private class holds information for properties defined for attribute generation. The user can
+     * configure the properties file such that attributes can be automatically generated and added into each
+     * request.
      */
     class Generator {
         Path file;
@@ -128,9 +122,9 @@ public class TestBase extends SimpleFileVisitor<Path> {
         /**
          * read - reads in the next line of data
          *
-         * @return      String - a line from the csv containing attribute data
+         * @return String - a line from the csv containing attribute data
          */
-        public String   read() {
+        public String read() {
             String str = null;
             if (is == null) {
                 try {
@@ -160,7 +154,7 @@ public class TestBase extends SimpleFileVisitor<Path> {
             return str;
         }
 
-        public void     close() {
+        public void close() {
             if (this.reader != null) {
                 try {
                     this.reader.close();
@@ -189,12 +183,21 @@ public class TestBase extends SimpleFileVisitor<Path> {
     public static Options options = new Options();
     static {
         options.addOption(new Option(OPTION_HELP, false, "Prints help."));
-        options.addOption(new Option(OPTION_TESTDIR, true, "Directory path where all the test properties and data are located."));
+        options.addOption(new Option(OPTION_TESTDIR, true,
+                                     "Directory path where all the test properties and data are located."));
         options.addOption(new Option(OPTION_TESTREST, false, "Test against RESTful PDP."));
-        options.addOption(new Option(OPTION_TESTURL, true, "URL to the RESTful PDP. Default is " + DEFAULT_RESTURL));
-        options.addOption(new Option(OPTION_TESTOUTPUT, true, "Specify a different location for dumping responses."));
-        options.addOption(new Option(OPTION_LOOP, true, "Number of times to loop through the tests. Default is 1. A value of -1 runs indefinitely."));
-        options.addOption(new Option(OPTION_TESTNUMBERS, true, "Comma-separated list of numbers found in the names of the test files to be run.  Numbers must exactly match the file name, e.g. '02'.  Used to limit testing to specific set of tests."));
+        options.addOption(new Option(OPTION_TESTURL, true, "URL to the RESTful PDP. Default is "
+                                                           + DEFAULT_RESTURL));
+        options.addOption(new Option(OPTION_TESTOUTPUT, true,
+                                     "Specify a different location for dumping responses."));
+        options
+            .addOption(new Option(OPTION_LOOP, true,
+                                  "Number of times to loop through the tests. Default is 1. A value of -1 runs indefinitely."));
+        options
+            .addOption(new Option(
+                                  OPTION_TESTNUMBERS,
+                                  true,
+                                  "Comma-separated list of numbers found in the names of the test files to be run.  Numbers must exactly match the file name, e.g. '02'.  Used to limit testing to specific set of tests."));
     }
 
     protected String directory = null;
@@ -204,29 +207,30 @@ public class TestBase extends SimpleFileVisitor<Path> {
     protected int loop = 1;
     protected PDPEngine engine = null;
     protected List<Generator> generators = new ArrayList<Generator>();
-    protected static DataTypeFactory dataTypeFactory            = null;
+    protected static DataTypeFactory dataTypeFactory = null;
 
-    private long        permits = 0;
-    private long        denies = 0;
-    private long        notapplicables = 0;
-    private long        indeterminates = 0;
+    private long permits = 0;
+    private long denies = 0;
+    private long notapplicables = 0;
+    private long indeterminates = 0;
 
-    private long        expectedPermits = 0;
-    private long        expectedDenies = 0;
-    private long        expectedNotApplicables = 0;
-    private long        expectedIndeterminates = 0;
+    private long expectedPermits = 0;
+    private long expectedDenies = 0;
+    private long expectedNotApplicables = 0;
+    private long expectedIndeterminates = 0;
 
-    private long        generatedpermits = 0;
-    private long        generateddenies = 0;
-    private long        generatednotapplicables = 0;
-    private long        generatedindeterminates = 0;
+    private long generatedpermits = 0;
+    private long generateddenies = 0;
+    private long generatednotapplicables = 0;
+    private long generatedindeterminates = 0;
 
-    private long        responseMatches = 0;
-    private long        responseNotMatches = 0;
+    private long responseMatches = 0;
+    private long responseNotMatches = 0;
 
-    private String[]    testNumbersArray = null;
+    private String[] testNumbersArray = null;
 
-    protected final Pattern pattern = Pattern.compile("Request[.]\\d+[.](Permit|Deny|NA|Indeterminate|Generate|Unknown)\\.(json|xml)");
+    protected final Pattern pattern = Pattern
+        .compile("Request[.]\\d+[.](Permit|Deny|NA|Indeterminate|Generate|Unknown)\\.(json|xml)");
 
     public static boolean isJSON(Path file) {
         return file.toString().endsWith(".json");
@@ -265,8 +269,7 @@ public class TestBase extends SimpleFileVisitor<Path> {
         // Check for what we have
         //
         if (cl.hasOption(OPTION_HELP)) {
-            new HelpFormatter().printHelp("Usage: -dir testdirectory OPTIONS",
-                                          options);
+            new HelpFormatter().printHelp("Usage: -dir testdirectory OPTIONS", options);
             throw new HelpException();
         }
         if (cl.hasOption(OPTION_TESTDIR)) {
@@ -354,7 +357,6 @@ public class TestBase extends SimpleFileVisitor<Path> {
 
     /**
      * Removes all the Response* files from the results directory.
-     *
      */
     public void removeResults() {
         try {
@@ -408,16 +410,19 @@ public class TestBase extends SimpleFileVisitor<Path> {
             // Create an attribute value. It is simply a placeholder for the field within
             // the CSV that contains the actual attribute value. It mainly holds the data type
             //
-            Identifier datatype = new IdentifierImpl(XACMLProperties.getProperty(attributePrefix + ".datatype"));
+            Identifier datatype = new IdentifierImpl(XACMLProperties.getProperty(attributePrefix
+                                                                                 + ".datatype"));
             Integer field = Integer.parseInt(XACMLProperties.getProperty(attributePrefix + ".field"));
             StdAttributeValue<?> value = new StdAttributeValue<>(datatype, field);
             //
             // Get the rest of the attribute properties
             //
-            Identifier category = new IdentifierImpl(XACMLProperties.getProperty(attributePrefix + ".category"));
+            Identifier category = new IdentifierImpl(XACMLProperties.getProperty(attributePrefix
+                                                                                 + ".category"));
             Identifier id = new IdentifierImpl(XACMLProperties.getProperty(attributePrefix + ".id"));
             String issuer = XACMLProperties.getProperty(attributePrefix + ".issuer");
-            boolean include = Boolean.parseBoolean(XACMLProperties.getProperty(attributePrefix + ".include", "false"));
+            boolean include = Boolean.parseBoolean(XACMLProperties.getProperty(attributePrefix + ".include",
+                                                                               "false"));
             //
             // Now we have a skeleton attribute
             //
@@ -426,12 +431,11 @@ public class TestBase extends SimpleFileVisitor<Path> {
     }
 
     /**
-     * This runs() the test instance. It first configure's itself and then walks the
-     * requests directory issue each request to the PDP engine.
+     * This runs() the test instance. It first configure's itself and then walks the requests directory issue
+     * each request to the PDP engine.
      *
      * @throws java.io.IOException
      * @throws com.att.research.xacml.util.FactoryException
-     *
      */
     public void run() throws IOException, FactoryException {
         //
@@ -496,7 +500,7 @@ public class TestBase extends SimpleFileVisitor<Path> {
                 String group = null;
                 int count = matcher.groupCount();
                 if (count >= 1) {
-                    group = matcher.group(count-1);
+                    group = matcher.group(count - 1);
                 }
                 //
                 // Send it
@@ -511,12 +515,13 @@ public class TestBase extends SimpleFileVisitor<Path> {
     }
 
     /**
-     * When a request file is encountered, this method is called send the request to the PDP engine. It will also dump
-     * the response object. If the group equals "Generate", then it will loop and send the request with generated attributes
-     * until that list is empty.
+     * When a request file is encountered, this method is called send the request to the PDP engine. It will
+     * also dump the response object. If the group equals "Generate", then it will loop and send the request
+     * with generated attributes until that list is empty.
      *
      * @param file - Request file. Eg. Request-01-Permit.json
-     * @param group - This is the parsed out string of the request file that defines if it is a Permit/Deny/Generate etc.
+     * @param group - This is the parsed out string of the request file that defines if it is a
+     *            Permit/Deny/Generate etc.
      * @throws Exception
      */
     protected void sendRequest(Path file, String group) throws Exception {
@@ -602,19 +607,19 @@ public class TestBase extends SimpleFileVisitor<Path> {
     }
 
     /**
-     * Reads the request file into a Request object based on its type.
-     *
-     * If the request has "Generate" in its filename, then this function will add
-     * generated attributes into the request.
+     * Reads the request file into a Request object based on its type. If the request has "Generate" in its
+     * filename, then this function will add generated attributes into the request.
      *
      * @param file - Request file. Eg. Request-01-Permit.json
-     * @param group - This is the parsed out string of the request file that defines if it is a Permit/Deny/Generate etc.
+     * @param group - This is the parsed out string of the request file that defines if it is a
+     *            Permit/Deny/Generate etc.
      * @return
      * @throws com.att.research.xacml.std.json.JSONStructureException
      * @throws com.att.research.xacml.std.dom.DOMStructureException
      * @throws com.att.research.xacml.api.pep.PEPException
      */
-    protected Request generateRequest(Path file, String group) throws JSONStructureException, DOMStructureException, PEPException {
+    protected Request generateRequest(Path file, String group) throws JSONStructureException,
+        DOMStructureException, PEPException {
         //
         // Convert to a XACML Request Object
         //
@@ -693,7 +698,7 @@ public class TestBase extends SimpleFileVisitor<Path> {
                 // be only ONE object in the collection.
                 //
                 AttributeValue<?> value = attribute.getValues().iterator().next();
-                Integer field = (Integer) value.getValue();
+                Integer field = (Integer)value.getValue();
                 //
                 // Is the field number valid?
                 //
@@ -704,7 +709,7 @@ public class TestBase extends SimpleFileVisitor<Path> {
                 //
                 // Determine what datatype it is
                 //
-                DataType<?> dataTypeExtended    = dataTypeFactory.getDataType(value.getDataTypeId());
+                DataType<?> dataTypeExtended = dataTypeFactory.getDataType(value.getDataTypeId());
                 if (dataTypeExtended == null) {
                     logger.error("Failed to determine datatype");
                     return null;
@@ -713,15 +718,17 @@ public class TestBase extends SimpleFileVisitor<Path> {
                 // Create the attribute value
                 //
                 try {
-                    AttributeValue<?> attributeValue = dataTypeExtended.createAttributeValue(fields.get(field));
+                    AttributeValue<?> attributeValue = dataTypeExtended.createAttributeValue(fields
+                        .get(field));
                     //
                     // Create the attribute
                     //
                     StdMutableAttribute newAttribute = new StdMutableAttribute(attribute.getCategory(),
-                            attribute.getAttributeId(),
-                            attributeValue,
-                            attribute.getIssuer(),
-                            attribute.getIncludeInResults());
+                                                                               attribute.getAttributeId(),
+                                                                               attributeValue,
+                                                                               attribute.getIssuer(),
+                                                                               attribute
+                                                                                   .getIncludeInResults());
                     boolean added = false;
                     for (StdMutableRequestAttributes a : attributes) {
                         //
@@ -779,7 +786,7 @@ public class TestBase extends SimpleFileVisitor<Path> {
             //
             // Open up the connection
             //
-            connection = (HttpURLConnection) this.restURL.openConnection();
+            connection = (HttpURLConnection)this.restURL.openConnection();
             connection.setRequestProperty("Content-Type", "application/json");
             //
             // Setup our method and headers
@@ -814,17 +821,20 @@ public class TestBase extends SimpleFileVisitor<Path> {
                 try {
                     contentType = ContentType.parse(connection.getContentType());
 
-                    if (contentType.getMimeType().equalsIgnoreCase(ContentType.APPLICATION_JSON.getMimeType())) {
+                    if (contentType.getMimeType()
+                        .equalsIgnoreCase(ContentType.APPLICATION_JSON.getMimeType())) {
                         response = JSONResponse.load(connection.getInputStream());
-                    } else if (contentType.getMimeType().equalsIgnoreCase(ContentType.APPLICATION_XML.getMimeType()) ||
-                               contentType.getMimeType().equalsIgnoreCase("application/xacml+xml") ) {
+                    } else if (contentType.getMimeType().equalsIgnoreCase(ContentType.APPLICATION_XML
+                                                                              .getMimeType())
+                               || contentType.getMimeType().equalsIgnoreCase("application/xacml+xml")) {
                         response = DOMResponse.load(connection.getInputStream());
                     } else {
                         logger.error("unknown content-type: " + contentType);
                     }
 
                 } catch (Exception e) {
-                    String message = "Parsing Content-Type: " + connection.getContentType() + ", error=" + e.getMessage();
+                    String message = "Parsing Content-Type: " + connection.getContentType() + ", error="
+                                     + e.getMessage();
                     logger.error(message, e);
                 }
 
@@ -839,9 +849,9 @@ public class TestBase extends SimpleFileVisitor<Path> {
     }
 
     /**
-     * This processes a response. Saves the response out to disk. If there is a corresponding response file for the request located
-     * in the "responses" sub-directory, then this method will compare that response file with what the engine returned to see if it
-     * matched.
+     * This processes a response. Saves the response out to disk. If there is a corresponding response file
+     * for the request located in the "responses" sub-directory, then this method will compare that response
+     * file with what the engine returned to see if it matched.
      *
      * @param requestFile
      * @param request
@@ -850,7 +860,8 @@ public class TestBase extends SimpleFileVisitor<Path> {
      * @param count
      * @throws Exception
      */
-    protected void processResponse(Path requestFile, Request request, Response response, String group, int count) throws Exception {
+    protected void processResponse(Path requestFile, Request request, Response response, String group,
+                                   int count) throws Exception {
         //
         // Construct the output filename
         //
@@ -859,16 +870,18 @@ public class TestBase extends SimpleFileVisitor<Path> {
         int num = requestFile.getNameCount();
         if (num < 2) {
             logger.error("Too few dir's in request filename.");
-            throw new Exception("Too few dir's in request filename. Format should be Request.[0-9]+.{Permit|Deny|NA|Indeterminate}.{json|xml}");
+            throw new Exception(
+                                "Too few dir's in request filename. Format should be Request.[0-9]+.{Permit|Deny|NA|Indeterminate}.{json|xml}");
         }
         String filename = requestFile.getFileName().toString();
         if (group.equals("Generate")) {
             //
             // Using count variable, construct a filename
             //
-            //          i.e. Response.03.Generate.{count}.json
+            // i.e. Response.03.Generate.{count}.json
             //
-            filename = "Response" + filename.substring(filename.indexOf('.'), filename.lastIndexOf('.')) + String.format("%03d", count) + filename.substring(filename.lastIndexOf('.'));
+            filename = "Response" + filename.substring(filename.indexOf('.'), filename.lastIndexOf('.'))
+                       + String.format("%03d", count) + filename.substring(filename.lastIndexOf('.'));
         } else {
             //
             // Construct filename
@@ -965,7 +978,8 @@ public class TestBase extends SimpleFileVisitor<Path> {
         //
         // Write the response to the result file
         //
-        logger.info("Request: " + requestFile.getFileName() + " response is: " + (response == null ? "null" : response.toString()));
+        logger.info("Request: " + requestFile.getFileName() + " response is: "
+                    + (response == null ? "null" : response.toString()));
         if (resultFile != null && response != null) {
             if (TestBase.isJSON(resultFile)) {
                 Files.write(resultFile, JSONResponse.toString(response, true).getBytes());
@@ -1034,7 +1048,7 @@ public class TestBase extends SimpleFileVisitor<Path> {
         }
     }
 
-    protected void      dumpStats() {
+    protected void dumpStats() {
         StringBuilder dump = new StringBuilder();
         dump.append(System.lineSeparator());
         dump.append("Permits: " + this.permits + " Expected: " + this.expectedPermits);
@@ -1057,18 +1071,16 @@ public class TestBase extends SimpleFileVisitor<Path> {
         dump.append(System.lineSeparator());
         dump.append("Responses NOT Matched: " + this.responseNotMatches);
 
-        if (this.permits != this.expectedPermits ||
-                this.denies != this.expectedDenies ||
-                this.notapplicables != this.expectedNotApplicables ||
-                this.indeterminates != this.expectedIndeterminates ||
-                this.responseNotMatches > 0) {
+        if (this.permits != this.expectedPermits || this.denies != this.expectedDenies
+            || this.notapplicables != this.expectedNotApplicables
+            || this.indeterminates != this.expectedIndeterminates || this.responseNotMatches > 0) {
             logger.fatal(dump.toString());
         } else {
             logger.info(dump.toString());
         }
     }
 
-    protected void      resetStats() {
+    protected void resetStats() {
         this.permits = 0;
         this.denies = 0;
         this.notapplicables = 0;

http://git-wip-us.apache.org/repos/asf/incubator-openaz/blob/38b6d318/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/annotations/TestAnnotation.java
----------------------------------------------------------------------
diff --git a/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/annotations/TestAnnotation.java b/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/annotations/TestAnnotation.java
index e026159..10787a3 100644
--- a/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/annotations/TestAnnotation.java
+++ b/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/annotations/TestAnnotation.java
@@ -68,22 +68,18 @@ import com.att.research.xacmlatt.pdp.test.TestBase;
 /**
  * This example application shows how to use annotations for Java classes to create requests to send to the
  * engine.
- *
- *
  */
 public class TestAnnotation extends TestBase {
-    private static final Log logger     = LogFactory.getLog(TestAnnotation.class);
+    private static final Log logger = LogFactory.getLog(TestAnnotation.class);
 
     private int num;
 
     /**
-     * This is a sample class that uses annotations. In addition to demonstrating how to use XACML annotations,
-     * it also demonstrates the various Java objects that can be used and how the request parser will
-     * resolve each object's datatype.
-     *
-     *
+     * This is a sample class that uses annotations. In addition to demonstrating how to use XACML
+     * annotations, it also demonstrates the various Java objects that can be used and how the request parser
+     * will resolve each object's datatype.
      */
-    @XACMLRequest(ReturnPolicyIdList=true)
+    @XACMLRequest(ReturnPolicyIdList = true)
     public class MyRequestAttributes {
 
         public MyRequestAttributes(String user, String action, String resource) {
@@ -95,97 +91,104 @@ public class TestAnnotation extends TestBase {
             this.yesterday.add(Calendar.DAY_OF_MONTH, -1);
         }
 
-        @XACMLSubject(includeInResults=true)
-        String  userID;
+        @XACMLSubject(includeInResults = true)
+        String userID;
 
-        @XACMLSubject(attributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id-qualifier")
+        @XACMLSubject(attributeId = "urn:oasis:names:tc:xacml:1.0:subject:subject-id-qualifier")
         boolean admin = false;
 
-        @XACMLSubject(attributeId="urn:oasis:names:tc:xacml:1.0:subject:key-info", issuer="com:foo:security")
-        HexBinary publicKey = new HexBinary(new byte[] {'1', '0'});
+        @XACMLSubject(attributeId = "urn:oasis:names:tc:xacml:1.0:subject:key-info", issuer = "com:foo:security")
+        HexBinary publicKey = new HexBinary(new byte[] {
+            '1', '0'
+        });
 
-        @XACMLSubject(attributeId="urn:oasis:names:tc:xacml:1.0:subject:authentication-time")
-        ISO8601Time     authenticationTime = new ISO8601Time(8, 0, 0, 0);
+        @XACMLSubject(attributeId = "urn:oasis:names:tc:xacml:1.0:subject:authentication-time")
+        ISO8601Time authenticationTime = new ISO8601Time(8, 0, 0, 0);
 
         /**
-         * Here our base object is "Object", but it is reflected as a Java "String". The parser
-         * will then use the XACML http://www.w3.org/2001/XMLSchema#string as the datatype.
+         * Here our base object is "Object", but it is reflected as a Java "String". The parser will then use
+         * the XACML http://www.w3.org/2001/XMLSchema#string as the datatype.
          */
-        @XACMLSubject(attributeId="urn:oasis:names:tc:xacml:1.0:subject:authentication-method")
+        @XACMLSubject(attributeId = "urn:oasis:names:tc:xacml:1.0:subject:authentication-method")
         Object authenticationMethod = new String("RSA Public Key");
 
         /**
-         * Here our base object is "String", but we use the annotation for datatype to clarify
-         * that the real XACML data type is http://www.w3.org/2001/XMLSchema#time. The parser will
-         * use the data type factory to convert the "String" to a "ISO8601Time" Java object.
+         * Here our base object is "String", but we use the annotation for datatype to clarify that the real
+         * XACML data type is http://www.w3.org/2001/XMLSchema#time. The parser will use the data type factory
+         * to convert the "String" to a "ISO8601Time" Java object.
          */
-        @XACMLSubject(attributeId="urn:oasis:names:tc:xacml:1.0:subject:request-time", datatype="http://www.w3.org/2001/XMLSchema#time")
+        @XACMLSubject(attributeId = "urn:oasis:names:tc:xacml:1.0:subject:request-time", datatype = "http://www.w3.org/2001/XMLSchema#time")
         String requestTime = new String("13:20:00-05:00");
 
-        @XACMLSubject(attributeId="urn:oasis:names:tc:xacml:1.0:subject:session-start-time")
-        ISO8601DateTime sessionStart = new ISO8601DateTime(TimeZone.getDefault().getID(), 2014, 1, 1, 10, 0, 0, 0);
+        @XACMLSubject(attributeId = "urn:oasis:names:tc:xacml:1.0:subject:session-start-time")
+        ISO8601DateTime sessionStart = new ISO8601DateTime(TimeZone.getDefault().getID(), 2014, 1, 1, 10, 0,
+                                                           0, 0);
 
-        @XACMLSubject(attributeId="urn:oasis:names:tc:xacml:3.0:subject:authn-locality:ip-address")
-        IPAddress ip = new IPv4Address(new short[] {123, 134, 156, 255 }, null, null);
+        @XACMLSubject(attributeId = "urn:oasis:names:tc:xacml:3.0:subject:authn-locality:ip-address")
+        IPAddress ip = new IPv4Address(new short[] {
+            123, 134, 156, 255
+        }, null, null);
 
-        @XACMLSubject(attributeId="urn:oasis:names:tc:xacml:3.0:subject:authn-locality:dns-name")
+        @XACMLSubject(attributeId = "urn:oasis:names:tc:xacml:3.0:subject:authn-locality:dns-name")
         String dnsName = "localhost";
 
         @XACMLAction()
-        String  action;
+        String action;
 
-        @XACMLAction(attributeId="urn:oasis:names:tc:xacml:1.0:action:implied-action")
-        long    impliedAction;
+        @XACMLAction(attributeId = "urn:oasis:names:tc:xacml:1.0:action:implied-action")
+        long impliedAction;
 
         @XACMLResource()
-        String  resource;
+        String resource;
 
         @XACMLEnvironment()
-        Date            today;
+        Date today;
 
         @XACMLEnvironment()
-        Calendar        yesterday;
+        Calendar yesterday;
 
         /**
          * This field demonstrates how the parser can detect collections and build a bag of values.
          */
-        @XACMLAttribute(attributeId="foo:bar:attribute")
-        Collection<Double>              fooBar = Arrays.asList(2.5, 3.5);
+        @XACMLAttribute(attributeId = "foo:bar:attribute")
+        Collection<Double> fooBar = Arrays.asList(2.5, 3.5);
 
         /**
          * The XACMLAttribute annotation allows one to specify all the
          */
-        @XACMLAttribute(category="foo:bar:category", attributeId="foo:bar:attribute2")
-        double          fooBar2 = 3.999;
+        @XACMLAttribute(category = "foo:bar:category", attributeId = "foo:bar:attribute2")
+        double fooBar2 = 3.999;
 
         /**
          * This field demonstrates how the parser can detect arrays and build a bag of values.
          */
-        @XACMLAttribute(category="foo:bar:category", attributeId="foo:bar:attribute:many")
-        URI[]           fooBarMany = new URI[] {URI.create("file://opt/app/test"), URI.create("https://localhost:8443/")};
+        @XACMLAttribute(category = "foo:bar:category", attributeId = "foo:bar:attribute:many")
+        URI[] fooBarMany = new URI[] {
+            URI.create("file://opt/app/test"), URI.create("https://localhost:8443/")
+        };
 
     };
 
-    @XACMLRequest(
-        Defaults="http://www.w3.org/TR/1999/Rec-xpath-19991116",
-    multiRequest=@XACMLMultiRequest(values= {
-        @XACMLRequestReference(values={"subject1", "action", "resource"}),
-        @XACMLRequestReference(values={"subject2", "action", "resource"})
-    })
-    )
+    @XACMLRequest(Defaults = "http://www.w3.org/TR/1999/Rec-xpath-19991116", multiRequest = @XACMLMultiRequest(values = {
+                                                           @XACMLRequestReference(values = {
+            "subject1", "action", "resource"
+        }), @XACMLRequestReference(values = {
+            "subject2", "action", "resource"
+        })
+                  }))
     public class MyMultiRequestAttributes {
 
-        @XACMLSubject(id="subject1")
-        String  userID1 = "John";
+        @XACMLSubject(id = "subject1")
+        String userID1 = "John";
 
-        @XACMLSubject(id="subject2")
-        String  userID2 = "Ringo";
+        @XACMLSubject(id = "subject2")
+        String userID2 = "Ringo";
 
-        @XACMLAction(id="action")
-        String  action = "access";
+        @XACMLAction(id = "action")
+        String action = "access";
 
-        @XACMLResource(id="resource")
-        String  resource = "www.mywebsite.com";
+        @XACMLResource(id = "resource")
+        String resource = "www.mywebsite.com";
     }
 
     public TestAnnotation(String[] args) throws MalformedURLException, ParseException, HelpException {
@@ -219,9 +222,11 @@ public class TestAnnotation extends TestBase {
             Response response = this.callPDP(RequestParser.parseRequest(info));
             Path resultFile;
             if (this.output != null) {
-                resultFile = Paths.get(this.output.toString(), "Response." + String.format("%03d", this.num) + ".json");
+                resultFile = Paths.get(this.output.toString(), "Response." + String.format("%03d", this.num)
+                                                               + ".json");
             } else {
-                resultFile = Paths.get(this.directory, "results", "Response." + String.format("%03d", this.num) + ".json");
+                resultFile = Paths.get(this.directory, "results",
+                                       "Response." + String.format("%03d", this.num) + ".json");
             }
             //
             // Write the response to the result file

http://git-wip-us.apache.org/repos/asf/incubator-openaz/blob/38b6d318/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/conformance/Conformance.java
----------------------------------------------------------------------
diff --git a/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/conformance/Conformance.java b/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/conformance/Conformance.java
index 7e75f3c..50d75a2 100644
--- a/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/conformance/Conformance.java
+++ b/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/conformance/Conformance.java
@@ -51,27 +51,19 @@ import com.att.research.xacml.api.Response;
 import com.att.research.xacml.api.Result;
 
 /**
- * Conformance is an application that runs a <code>ConformanceTestSet</code> and dumps results comparing the actual and
- * expected results.
- *
- * TO RUN in Eclipse:
- * This is run as a Java Application.
- * You must first create a Run/Debug Configuration:
- *              Under the Argument tab, in Program Arguments you must set the -i or --input command line argument.
- *              You should also direct the output to a file using -o or --output. (default is Console)
- *              See the init() method in this file for other useful arguments.
- *              Example for a Windows machine:
- *                      -i testsets/conformance/xacml3.0-ct-v.0.4
- *                      -o \Users\yourLogin\Downloads\conformance.txt
- *              You must also set the VM arguments:
- *                      -Dxacml.properties=testsets/conformance/xacml.properties .
- *                      -Dlog4j.configuration=.\logging.properties
- *
+ * Conformance is an application that runs a <code>ConformanceTestSet</code> and dumps results comparing the
+ * actual and expected results. TO RUN in Eclipse: This is run as a Java Application. You must first create a
+ * Run/Debug Configuration: Under the Argument tab, in Program Arguments you must set the -i or --input
+ * command line argument. You should also direct the output to a file using -o or --output. (default is
+ * Console) See the init() method in this file for other useful arguments. Example for a Windows machine: -i
+ * testsets/conformance/xacml3.0-ct-v.0.4 -o \Users\yourLogin\Downloads\conformance.txt You must also set the
+ * VM arguments: -Dxacml.properties=testsets/conformance/xacml.properties .
+ * -Dlog4j.configuration=.\logging.properties
  */
 public class Conformance {
     private ConformanceScopeResolver scopeResolver;
     private ConformanceTestEngine testEngine;
-    private ConformanceTestSet testSet                  = new ConformanceTestSet();
+    private ConformanceTestSet testSet = new ConformanceTestSet();
     private File outputFile;
     private PrintWriter outputFileWriter;
 
@@ -92,26 +84,22 @@ public class Conformance {
     private int obligationsMatch;
     private int unknownFunctions;
 
-
-
-
     protected synchronized ConformanceScopeResolver getScopeResolver() {
         if (this.scopeResolver == null) {
-            this.scopeResolver  = new ConformanceScopeResolver();
+            this.scopeResolver = new ConformanceScopeResolver();
 
             /*
-             * TODO:
-             * Add the known scopes for the 2.0 conformance test.  This could be made more general by allowing loading
-             * from a properties file eventually.
+             * TODO: Add the known scopes for the 2.0 conformance test. This could be made more general by
+             * allowing loading from a properties file eventually.
              */
             try {
-                URI ID_SCOPE_ROOT       = new URI("urn:root");
-                URI ID_SCOPE_CHILD1     = new URI("urn:root:child1");
-                URI ID_SCOPE_CHILD2     = new URI("urn:root:child2");
-                URI ID_SCOPE_C1D1       = new URI("urn:root:child1:descendant1");
-                URI ID_SCOPE_C1D2       = new URI("urn:root:child1:descendant2");
-                URI ID_SCOPE_C2D1       = new URI("urn:root:child2:descendant1");
-                URI ID_SCOPE_C2D2       = new URI("urn:root:child2:descendant2");
+                URI ID_SCOPE_ROOT = new URI("urn:root");
+                URI ID_SCOPE_CHILD1 = new URI("urn:root:child1");
+                URI ID_SCOPE_CHILD2 = new URI("urn:root:child2");
+                URI ID_SCOPE_C1D1 = new URI("urn:root:child1:descendant1");
+                URI ID_SCOPE_C1D2 = new URI("urn:root:child1:descendant2");
+                URI ID_SCOPE_C2D1 = new URI("urn:root:child2:descendant1");
+                URI ID_SCOPE_C2D2 = new URI("urn:root:child2:descendant2");
 
                 this.scopeResolver.add(ID_SCOPE_ROOT, ID_SCOPE_CHILD1);
                 this.scopeResolver.add(ID_SCOPE_CHILD1, ID_SCOPE_C1D1);
@@ -137,16 +125,15 @@ public class Conformance {
         boolean lenientRequests = true;
         boolean lenientPolicies = false;
         // default is to not run any non-first-time iterations
-        int iterations                  = -1;
+        int iterations = -1;
         String testSetDirectoryNames = "";
-        for (int i = 0 ; i < args.length ; ) {
+        for (int i = 0; i < args.length;) {
 
             if (args[i].equals("-h") || args[i].equals("--help") || args[i].equals("-help")) {
                 printHelp();
                 return false;
             }
 
-
             // where the XML Request/Response files are located
             if (args[i].equals("-i") || args[i].equals("--input")) {
                 i++;
@@ -163,14 +150,15 @@ public class Conformance {
 
                 // File path name where output will be put - default is stdout == Console
             } else if (args[i].equals("-o") || args[i].equals("--output")) {
-                if (i+1 < args.length) {
-                    this.outputFile     = new File(args[i+1]);
-                    i   += 2;
+                if (i + 1 < args.length) {
+                    this.outputFile = new File(args[i + 1]);
+                    i += 2;
                 } else {
                     System.err.println("Missing argument to " + args[i] + " command line option");
                     return false;
                 }
-                // A list of specific test names (e.g.: -t IIA001 IIA007 IIIE301) - default is to run all tests
+                // A list of specific test names (e.g.: -t IIA001 IIA007 IIIE301) - default is to run all
+                // tests
             } else if (args[i].equals("-t") || args[i].equals("--tests")) {
                 i++;
                 while (i < args.length && !args[i].startsWith("-")) {
@@ -181,21 +169,23 @@ public class Conformance {
                     System.err.println("Missing test names after -t or --tests argument");
                     return false;
                 }
-                // Include full details in the response, both the expected reqsponse (from file) and the actual response
+                // Include full details in the response, both the expected reqsponse (from file) and the
+                // actual response
             } else if (args[i].equals("-v") || args[i].equals("--verbose")) {
-                this.verbose    = true;
+                this.verbose = true;
                 i++;
                 // Report only failures (success is silent)
             } else if (args[i].equals("-f") || args[i].equals("--failures")) {
-                this.failuresOnly       = true;
+                this.failuresOnly = true;
                 i++;
-                // When set, the XML must not contain extra attibutes/elements.  Default is "lenient" where unexpected entries are ignored
+                // When set, the XML must not contain extra attibutes/elements. Default is "lenient" where
+                // unexpected entries are ignored
             } else if (args[i].equals("-s") || args[i].equals("--strict")) {
-                this.strict     = true;
+                this.strict = true;
                 i++;
                 // (self explanatory)
             } else if (args[i].equals("--stop-on-error")) {
-                this.stopOnFirstError   = true;
+                this.stopOnFirstError = true;
                 i++;
             } else if (args[i].equals("--lenient")) {
                 lenientPolicies = true;
@@ -216,14 +206,15 @@ public class Conformance {
             } else if (args[i].equals("--iterations")) {
                 // this is a count of how many ADDITIONAL times the decide() should be called.
                 // The first time decide() is called it takes a long time to set up,
-                // so to get an accurate number for how fast a single Request is handled we need to ignore the time for the first run
+                // so to get an accurate number for how fast a single Request is handled we need to ignore the
+                // time for the first run
                 // and timings for 1 or more non-first-time calls to decide().
-                if (i+1 < args.length) {
+                if (i + 1 < args.length) {
                     try {
-                        iterations      = Integer.parseInt(args[i+1]);
-                        i       += 2;
+                        iterations = Integer.parseInt(args[i + 1]);
+                        i += 2;
                     } catch (NumberFormatException ex) {
-                        System.err.println("Invalid iteration count '" + args[i+1] + "'");
+                        System.err.println("Invalid iteration count '" + args[i + 1] + "'");
                         return false;
                     }
                 } else {
@@ -231,7 +222,8 @@ public class Conformance {
                     return false;
                 }
                 if (iterations < 1) {
-                    System.err.println("Cannot use --iterations " + iterations + ".  Must use an integer greater than 0");
+                    System.err.println("Cannot use --iterations " + iterations
+                                       + ".  Must use an integer greater than 0");
                     return false;
                 }
             } else {
@@ -240,7 +232,8 @@ public class Conformance {
             }
         }
 
-        this.testEngine = new ConformanceTestEngine(this.getScopeResolver(), lenientRequests, lenientPolicies, iterations);
+        this.testEngine = new ConformanceTestEngine(this.getScopeResolver(), lenientRequests,
+                                                    lenientPolicies, iterations);
 
         if (testSetDirectoryNames.length() == 0) {
             System.err.println("No test set directory given (need -i or --iniput command line option)");
@@ -259,10 +252,10 @@ public class Conformance {
         }
 
         if (this.outputFile == null) {
-            this.outputFileWriter       = new PrintWriter(System.out);
+            this.outputFileWriter = new PrintWriter(System.out);
         } else {
             try {
-                this.outputFileWriter   = new PrintWriter(new FileOutputStream(this.outputFile));
+                this.outputFileWriter = new PrintWriter(new FileOutputStream(this.outputFile));
             } catch (IOException ex) {
                 System.err.println("Cannot open " + this.outputFile.getAbsolutePath() + " for writing.");
                 return false;
@@ -275,56 +268,68 @@ public class Conformance {
     private void printHelp() {
         System.out.println("usage: Conformance --input <tests_directory> OPTIONS");
         System.out.println("");
-        System.out.println(" -f, --failures             Only include failed tests in the output.  \n"+
-                           "                    Default is to include all test's results in the output file.");
+        System.out
+            .println(" -f, --failures             Only include failed tests in the output.  \n"
+                     + "                    Default is to include all test's results in the output file.");
         System.out.println("");
         System.out.println(" -h, --help         Prints help.");
 
         System.out.println("");
-        System.out.println(" -i, --input <dir>  Directory containing the XML Request/Response files.  \n"+
-                           "                    This may be multiple space-separated directory paths.  REQUIRED");
+        System.out
+            .println(" -i, --input <dir>  Directory containing the XML Request/Response files.  \n"
+                     + "                    This may be multiple space-separated directory paths.  REQUIRED");
 
         System.out.println("");
-        System.out.println(" --iterations               The number of times to run through the set of tests in the input directory.");
+        System.out
+            .println(" --iterations               The number of times to run through the set of tests in the input directory.");
 
         System.out.println("");
-        System.out.println(" --lenient          Allow both Requests and Policies to have unexpected elements, no data in <Content>, etc. \n"+
-                           "                    Default is to not allow anything that is not explicitly listed in the XACML spec.");
+        System.out
+            .println(" --lenient          Allow both Requests and Policies to have unexpected elements, no data in <Content>, etc. \n"
+                     + "                    Default is to not allow anything that is not explicitly listed in the XACML spec.");
 
         System.out.println("");
-        System.out.println(" --lenient-policies Allow Policies to have unexpected elements, no data in <Content>, etc.  \n" +
-                           "                    Default is to not allow anything that is not explicitly listed in the XACML spec.");
+        System.out
+            .println(" --lenient-policies Allow Policies to have unexpected elements, no data in <Content>, etc.  \n"
+                     + "                    Default is to not allow anything that is not explicitly listed in the XACML spec.");
 
         System.out.println("");
-        System.out.println(" --lenient-requests Allow Requests to have unexpected elements, no data in <Content>, etc.  \n" +
-                           "                    Default is to not allow anything that is not explicitly listed in the XACML spec.");
+        System.out
+            .println(" --lenient-requests Allow Requests to have unexpected elements, no data in <Content>, etc.  \n"
+                     + "                    Default is to not allow anything that is not explicitly listed in the XACML spec.");
 
         System.out.println("");
         System.out.println(" -o, --output <dir> Directory where the output results file will be put.");
 
         System.out.println("");
-        System.out.println(" -s, --strict               Check both the Decision and all other parts of the Response (Attributes, Obligations and Advice). \n "+
-                           "                    Default is to check just the Decision.");
+        System.out
+            .println(" -s, --strict               Check both the Decision and all other parts of the Response (Attributes, Obligations and Advice). \n "
+                     + "                    Default is to check just the Decision.");
 
         System.out.println("");
-        System.out.println(" --stop-on-error    Stop running conformance tests the first time one fails.  Default is to continue through all tests.");
+        System.out
+            .println(" --stop-on-error    Stop running conformance tests the first time one fails.  Default is to continue through all tests.");
 
         System.out.println("");
-        System.out.println(" --strict-policies  Require Policies to have no unexpected elements, data in <Content>, etc.  \n" +
-                           "                    This is the default, but can be used to override Policies when option --lenient is used.");
+        System.out
+            .println(" --strict-policies  Require Policies to have no unexpected elements, data in <Content>, etc.  \n"
+                     + "                    This is the default, but can be used to override Policies when option --lenient is used.");
 
         System.out.println("");
-        System.out.println(" --strict-requests  Require Requests to have no unexpected elements, data in <Content>, etc.  \n" +
-                           "                    This is the default, but can be used to override Requests when option --lenient is used.");
+        System.out
+            .println(" --strict-requests  Require Requests to have no unexpected elements, data in <Content>, etc.  \n"
+                     + "                    This is the default, but can be used to override Requests when option --lenient is used.");
 
         System.out.println("");
-        System.out.println(" -t, --tests <list of test names>   A space-separated list of specific tests to be run. \n" +
-                           "                    These are just the names of the tests as in 'IIA001 IIC178'.  \n" +
-                           "                    Default is to run all tests in the input directory.");
+        System.out
+            .println(" -t, --tests <list of test names>   A space-separated list of specific tests to be run. \n"
+                     + "                    These are just the names of the tests as in 'IIA001 IIC178'.  \n"
+                     + "                    Default is to run all tests in the input directory.");
 
         System.out.println("");
-        System.out.println(" -v, --verbose              The entire expected and actual Response objects in the output.  \n"+
-                           "                    Default is just a summary line.");
+        System.out
+            .println(" -v, --verbose              The entire expected and actual Response objects in the output.  \n"
+                     + "                    Default is just a summary line.");
 
     }
 
@@ -336,12 +341,9 @@ public class Conformance {
         if (!responseMatchResult.decisionsMatch() || !responseMatchResult.statusCodesMatch()) {
             return true;
         } else if (this.strict) {
-            if (!responseMatchResult.associatedAdviceMatches() ||
-                    !responseMatchResult.attributesMatch() ||
-                    !responseMatchResult.obligationsMatch() ||
-                    !responseMatchResult.policyIdentifiersMatch() ||
-                    !responseMatchResult.policySetIdentifiersMatch()
-               ) {
+            if (!responseMatchResult.associatedAdviceMatches() || !responseMatchResult.attributesMatch()
+                || !responseMatchResult.obligationsMatch() || !responseMatchResult.policyIdentifiersMatch()
+                || !responseMatchResult.policySetIdentifiersMatch()) {
                 return true;
             }
         }
@@ -351,24 +353,31 @@ public class Conformance {
     private void dump(AttributeAssignment attributeAssignment) {
         this.outputFileWriter.println("\t\t\t\tAttributeAssignment:");
         if (attributeAssignment.getCategory() != null) {
-            this.outputFileWriter.println("\t\t\t\t\tCategory: " + attributeAssignment.getCategory().stringValue());
+            this.outputFileWriter.println("\t\t\t\t\tCategory: "
+                                          + attributeAssignment.getCategory().stringValue());
         }
         if (attributeAssignment.getAttributeId() != null) {
-            this.outputFileWriter.println("\t\t\t\t\tAttributeId: " + attributeAssignment.getAttributeId().stringValue());
+            this.outputFileWriter.println("\t\t\t\t\tAttributeId: "
+                                          + attributeAssignment.getAttributeId().stringValue());
         }
         if (attributeAssignment.getDataTypeId() != null) {
-            this.outputFileWriter.println("\t\t\t\t\tDataType: " + attributeAssignment.getDataTypeId().stringValue());
+            this.outputFileWriter.println("\t\t\t\t\tDataType: "
+                                          + attributeAssignment.getDataTypeId().stringValue());
         }
         if (attributeAssignment.getIssuer() != null) {
             this.outputFileWriter.println("\t\t\t\t\tIssuer: " + attributeAssignment.getIssuer());
         }
-        if (attributeAssignment.getAttributeValue() != null && attributeAssignment.getAttributeValue().getValue() != null) {
-            this.outputFileWriter.println("\t\t\t\t\tValue: " + attributeAssignment.getAttributeValue().getValue().toString());
+        if (attributeAssignment.getAttributeValue() != null
+            && attributeAssignment.getAttributeValue().getValue() != null) {
+            this.outputFileWriter.println("\t\t\t\t\tValue: "
+                                          + attributeAssignment.getAttributeValue().getValue().toString());
         }
     }
 
     private void dump(Attribute attribute) {
-        this.outputFileWriter.println("\t\t\t\t\tAttribute: " + (attribute.getAttributeId() == null ? "" : attribute.getAttributeId().stringValue()));
+        this.outputFileWriter.println("\t\t\t\t\tAttribute: "
+                                      + (attribute.getAttributeId() == null ? "" : attribute.getAttributeId()
+                                          .stringValue()));
         if (attribute.getIssuer() != null) {
             this.outputFileWriter.println("\t\t\t\t\t\tIssuer: " + attribute.getIssuer());
         }
@@ -377,9 +386,10 @@ public class Conformance {
             this.outputFileWriter.println("\t\t\t\t\t\tValues: ");
             while (iterAttributeValues.hasNext()) {
                 this.outputFileWriter.print("\t\t\t\t\t\t\t");
-                AttributeValue<?> attributeValue        = iterAttributeValues.next();
+                AttributeValue<?> attributeValue = iterAttributeValues.next();
                 if (attributeValue.getDataTypeId() != null) {
-                    this.outputFileWriter.print("DataType: " + attributeValue.getDataTypeId().stringValue() + " ");
+                    this.outputFileWriter.print("DataType: " + attributeValue.getDataTypeId().stringValue()
+                                                + " ");
                 }
                 if (attributeValue.getValue() != null) {
                     this.outputFileWriter.print("Value: " + attributeValue.getValue().toString());
@@ -390,11 +400,13 @@ public class Conformance {
     }
 
     private void dump(AttributeCategory attributeCategory) {
-        this.outputFileWriter.println("\t\t\tAttributeCategory: " + (attributeCategory.getCategory() == null ? "" : attributeCategory.getCategory().stringValue()));
-        Collection<Attribute> listAttributes    = attributeCategory.getAttributes();
+        this.outputFileWriter.println("\t\t\tAttributeCategory: "
+                                      + (attributeCategory.getCategory() == null ? "" : attributeCategory
+                                          .getCategory().stringValue()));
+        Collection<Attribute> listAttributes = attributeCategory.getAttributes();
         if (listAttributes.size() > 0) {
             this.outputFileWriter.println("\t\t\t\tAttributes:");
-            for (Attribute attribute: listAttributes) {
+            for (Attribute attribute : listAttributes) {
                 this.dump(attribute);
             }
         }
@@ -402,44 +414,48 @@ public class Conformance {
 
     private void dump(Result result) {
         this.outputFileWriter.println("\t\t======== Result ==========");
-        this.outputFileWriter.println("\t\tDecision: " + (result.getDecision() == null ? "null" : result.getDecision().name()));
+        this.outputFileWriter
+            .println("\t\tDecision: " + (result.getDecision() == null ? "null" : result.getDecision().name()));
         if (result.getStatus() == null) {
             this.outputFileWriter.println("\t\tStatus: null");
         } else {
             this.outputFileWriter.println("\t\tStatus:");
             if (result.getStatus().getStatusCode() != null) {
-                this.outputFileWriter.println("\t\t\tStatusCode: " + result.getStatus().getStatusCode().toString());
+                this.outputFileWriter.println("\t\t\tStatusCode: "
+                                              + result.getStatus().getStatusCode().toString());
             }
             if (result.getStatus().getStatusMessage() != null) {
-                this.outputFileWriter.println("\t\t\tStatusMessage: " + result.getStatus().getStatusMessage());
+                this.outputFileWriter
+                    .println("\t\t\tStatusMessage: " + result.getStatus().getStatusMessage());
             }
             if (result.getStatus().getStatusDetail() != null) {
-                this.outputFileWriter.println("\t\t\tStatusDetail: " + result.getStatus().getStatusDetail().toString());
+                this.outputFileWriter.println("\t\t\tStatusDetail: "
+                                              + result.getStatus().getStatusDetail().toString());
             }
         }
-        Collection<Advice> listAdvice   = result.getAssociatedAdvice();
+        Collection<Advice> listAdvice = result.getAssociatedAdvice();
         if (listAdvice.size() > 0) {
             this.outputFileWriter.println("\t\tAdvice:");
             for (Advice advice : listAdvice) {
                 if (advice.getId() != null) {
                     this.outputFileWriter.println("\t\t\tId: " + advice.getId().stringValue());
                 }
-                Collection<AttributeAssignment> attributeAssignments    = advice.getAttributeAssignments();
+                Collection<AttributeAssignment> attributeAssignments = advice.getAttributeAssignments();
                 if (attributeAssignments.size() > 0) {
                     this.outputFileWriter.println("\t\t\tAttributeAssignments:");
-                    for (AttributeAssignment attributeAssignment: attributeAssignments) {
+                    for (AttributeAssignment attributeAssignment : attributeAssignments) {
                         this.dump(attributeAssignment);
                     }
                 }
             }
         }
-        Collection<Obligation> listObligations  = result.getObligations();
+        Collection<Obligation> listObligations = result.getObligations();
         if (listObligations.size() > 0) {
-            for (Obligation obligation: listObligations) {
+            for (Obligation obligation : listObligations) {
                 if (obligation.getId() != null) {
                     this.outputFileWriter.println("\t\t\tId: " + obligation.getId().stringValue());
                 }
-                Collection<AttributeAssignment> attributeAssignments    = obligation.getAttributeAssignments();
+                Collection<AttributeAssignment> attributeAssignments = obligation.getAttributeAssignments();
                 if (attributeAssignments.size() > 0) {
                     this.outputFileWriter.println("\t\t\tAttributeAssignments:");
                     for (AttributeAssignment attributeAssignment : attributeAssignments) {
@@ -448,7 +464,7 @@ public class Conformance {
                 }
             }
         }
-        Collection<AttributeCategory> listAttributeCategories   = result.getAttributes();
+        Collection<AttributeCategory> listAttributeCategories = result.getAttributes();
         if (listAttributeCategories.size() > 0) {
             this.outputFileWriter.println("\t\tAttributes:");
             for (AttributeCategory attributeCategory : listAttributeCategories) {
@@ -486,31 +502,37 @@ public class Conformance {
 
         ResponseMatchResult responseMatchResult = conformanceTestResult.getResponseMatchResult();
         if (this.verbose) {
-            this.outputFileWriter.println("========== Test " + conformanceTestResult.getConformanceTest().getTestName() + " ==========");
+            this.outputFileWriter.println("========== Test "
+                                          + conformanceTestResult.getConformanceTest().getTestName()
+                                          + " ==========");
             this.dump("Expected Response", conformanceTestResult.getExpectedResponse());
             this.dump("Actual Response", conformanceTestResult.getActualResponse());
             if (responseMatchResult != null) {
                 this.outputFileWriter.println("\t========== Matching ==========");
                 this.outputFileWriter.println("\tDecisions Match? " + responseMatchResult.decisionsMatch());
-                this.outputFileWriter.println("\tStatus Codes Match? " + responseMatchResult.statusCodesMatch());
+                this.outputFileWriter.println("\tStatus Codes Match? "
+                                              + responseMatchResult.statusCodesMatch());
                 this.outputFileWriter.println("\tAttributes Match? " + responseMatchResult.attributesMatch());
-                this.outputFileWriter.println("\tPolicyIds Match? " + responseMatchResult.policyIdentifiersMatch());
-                this.outputFileWriter.println("\tPolicySetIds Match? " + responseMatchResult.policySetIdentifiersMatch());
-                this.outputFileWriter.println("\tAssociated Advice Match? " + responseMatchResult.associatedAdviceMatches());
-                this.outputFileWriter.println("\tObligations Match? " + responseMatchResult.obligationsMatch());
+                this.outputFileWriter.println("\tPolicyIds Match? "
+                                              + responseMatchResult.policyIdentifiersMatch());
+                this.outputFileWriter.println("\tPolicySetIds Match? "
+                                              + responseMatchResult.policySetIdentifiersMatch());
+                this.outputFileWriter.println("\tAssociated Advice Match? "
+                                              + responseMatchResult.associatedAdviceMatches());
+                this.outputFileWriter.println("\tObligations Match? "
+                                              + responseMatchResult.obligationsMatch());
                 this.outputFileWriter.println("========== End ==========");
             }
         } else {
-            String testName     = conformanceTestResult.getConformanceTest().getTestName();
+            String testName = conformanceTestResult.getConformanceTest().getTestName();
             if (responseMatchResult != null) {
-                Iterator<ResultMatchResult> iterResultMatches   = responseMatchResult.getResultMatchResults();
+                Iterator<ResultMatchResult> iterResultMatches = responseMatchResult.getResultMatchResults();
                 if (iterResultMatches == null || !iterResultMatches.hasNext()) {
                     this.outputFileWriter.println(testName);
                 } else {
                     while (iterResultMatches.hasNext()) {
-                        ResultMatchResult resultMatchResult     = iterResultMatches.next();
-                        this.outputFileWriter.printf("%s,%s,%s,%s,%s,%s,%s,%s,%d,%d\n",
-                                                     testName,
+                        ResultMatchResult resultMatchResult = iterResultMatches.next();
+                        this.outputFileWriter.printf("%s,%s,%s,%s,%s,%s,%s,%s,%d,%d\n", testName,
                                                      resultMatchResult.decisionsMatch(),
                                                      resultMatchResult.statusCodesMatch(),
                                                      resultMatchResult.attributesMatch(),
@@ -519,8 +541,7 @@ public class Conformance {
                                                      resultMatchResult.associatedAdviceMatches(),
                                                      resultMatchResult.obligationsMatch(),
                                                      conformanceTestResult.getFirstCallTime(),
-                                                     conformanceTestResult.getAverageTotalLoopTime()
-                                                    );
+                                                     conformanceTestResult.getAverageTotalLoopTime());
                     }
                 }
             }
@@ -530,21 +551,21 @@ public class Conformance {
 
     private boolean run(ConformanceTest conformanceTest) throws Exception {
         this.testsRun++;
-        ConformanceTestResult conformanceTestResult     = this.testEngine.run(conformanceTest);
-        boolean bFailed                                                         = true;
+        ConformanceTestResult conformanceTestResult = this.testEngine.run(conformanceTest);
+        boolean bFailed = true;
         if (conformanceTestResult != null) {
-            ResponseMatchResult responseMatchResult     = conformanceTestResult.getResponseMatchResult();
+            ResponseMatchResult responseMatchResult = conformanceTestResult.getResponseMatchResult();
             if (responseMatchResult != null) {
                 if (responseMatchResult.decisionsMatch()) {
                     this.decisionsMatch++;
-                    this.statusCodesMatch       += (responseMatchResult.statusCodesMatch() ? 1 : 0);
-                    this.attributesMatch        += (responseMatchResult.attributesMatch() ? 1 : 0);
-                    this.policyIdsMatch         += (responseMatchResult.policyIdentifiersMatch() ? 1 : 0);
-                    this.policySetIdsMatch      += (responseMatchResult.policySetIdentifiersMatch() ? 1 : 0);
-                    this.associatedAdviceMatch  += (responseMatchResult.associatedAdviceMatches() ? 1 : 0);
-                    this.obligationsMatch               += (responseMatchResult.obligationsMatch() ? 1 : 0);
+                    this.statusCodesMatch += (responseMatchResult.statusCodesMatch() ? 1 : 0);
+                    this.attributesMatch += (responseMatchResult.attributesMatch() ? 1 : 0);
+                    this.policyIdsMatch += (responseMatchResult.policyIdentifiersMatch() ? 1 : 0);
+                    this.policySetIdsMatch += (responseMatchResult.policySetIdentifiersMatch() ? 1 : 0);
+                    this.associatedAdviceMatch += (responseMatchResult.associatedAdviceMatches() ? 1 : 0);
+                    this.obligationsMatch += (responseMatchResult.obligationsMatch() ? 1 : 0);
                 }
-                this.unknownFunctions           += (responseMatchResult.unknownFunction() ? 1 : 0);
+                this.unknownFunctions += (responseMatchResult.unknownFunction() ? 1 : 0);
                 bFailed = this.failed(conformanceTestResult);
                 if (bFailed || !this.failuresOnly) {
                     this.dump(conformanceTestResult);
@@ -557,25 +578,26 @@ public class Conformance {
     }
 
     private void run() throws Exception {
-        long tStart     = System.currentTimeMillis();
+        long tStart = System.currentTimeMillis();
 
         if (!this.verbose) {
-            this.outputFileWriter.println("Test,Decision,Status,Attributes,PolicyIds,PolicySetIds,Advice,Obligations");
+            this.outputFileWriter
+                .println("Test,Decision,Status,Attributes,PolicyIds,PolicySetIds,Advice,Obligations");
         }
-        Iterator<ConformanceTest> iterConformanceTests  = this.testSet.getConformanceTests();
-        boolean bContinue                                                               = true;
+        Iterator<ConformanceTest> iterConformanceTests = this.testSet.getConformanceTests();
+        boolean bContinue = true;
         while (bContinue && iterConformanceTests.hasNext()) {
-//                      bContinue       = this.run(iterConformanceTests.next());
+            // bContinue = this.run(iterConformanceTests.next());
             ConformanceTest test = iterConformanceTests.next();
             if (testNamesToRun.size() > 0) {
-                if ( ! testNamesToRun.contains(test.getTestName())) {
+                if (!testNamesToRun.contains(test.getTestName())) {
                     continue;
                 }
             }
-            bContinue   = this.run(test);
+            bContinue = this.run(test);
         }
 
-        long tElapsed   = System.currentTimeMillis() - tStart;
+        long tElapsed = System.currentTimeMillis() - tStart;
 
         if (this.verbose) {
             this.outputFileWriter.println("Tests run = " + this.testsRun);
@@ -588,32 +610,32 @@ public class Conformance {
             this.outputFileWriter.println("Obligations match = " + this.obligationsMatch);
             this.outputFileWriter.println("Unknown functions = " + this.unknownFunctions);
         } else {
-            this.outputFileWriter.printf("Total (%d),%d,%d,%d,%d,%d,%d,%d,%d\n",
-                                         this.testsRun,
-                                         this.decisionsMatch,
-                                         this.statusCodesMatch,
-                                         this.attributesMatch,
-                                         this.policyIdsMatch,
-                                         this.policySetIdsMatch,
-                                         this.associatedAdviceMatch,
-                                         this.obligationsMatch,
+            this.outputFileWriter.printf("Total (%d),%d,%d,%d,%d,%d,%d,%d,%d\n", this.testsRun,
+                                         this.decisionsMatch, this.statusCodesMatch, this.attributesMatch,
+                                         this.policyIdsMatch, this.policySetIdsMatch,
+                                         this.associatedAdviceMatch, this.obligationsMatch,
                                          this.unknownFunctions);
         }
 
         if (tElapsed > 0) {
-            long tHours         = tElapsed / (60*60*1000);
-            tElapsed            = tElapsed - tHours * 60 * 60 *1000;
-            long tMinutes       = tElapsed / (60*1000);
-            tElapsed            = tElapsed - tMinutes * 60 * 1000;
-            long tSeconds       = tElapsed / 1000;
-            tElapsed            = tElapsed - tSeconds * 1000;
-
-            this.outputFileWriter.printf("Elapsed time = %02d:%02d:%02d.%03d\n", tHours, tMinutes, tSeconds, tElapsed);
-            this.outputFileWriter.printf("First decide time in nano-seconds %d\n", this.testEngine.getFirstDecideTime());
-            this.outputFileWriter.printf("Total Multiple decide time in nano-seconds %d\n", this.testEngine.getDecideTimeMultiple());
-
-            this.outputFileWriter.printf("\nAverage First decide time in nano-seconds %d\n", this.testEngine.getAvgFirstDecideTime());
-            this.outputFileWriter.printf("Average decide time after first call in nano-seconds %d\n", this.testEngine.getAvgDecideTimeMultiple());
+            long tHours = tElapsed / (60 * 60 * 1000);
+            tElapsed = tElapsed - tHours * 60 * 60 * 1000;
+            long tMinutes = tElapsed / (60 * 1000);
+            tElapsed = tElapsed - tMinutes * 60 * 1000;
+            long tSeconds = tElapsed / 1000;
+            tElapsed = tElapsed - tSeconds * 1000;
+
+            this.outputFileWriter.printf("Elapsed time = %02d:%02d:%02d.%03d\n", tHours, tMinutes, tSeconds,
+                                         tElapsed);
+            this.outputFileWriter.printf("First decide time in nano-seconds %d\n",
+                                         this.testEngine.getFirstDecideTime());
+            this.outputFileWriter.printf("Total Multiple decide time in nano-seconds %d\n",
+                                         this.testEngine.getDecideTimeMultiple());
+
+            this.outputFileWriter.printf("\nAverage First decide time in nano-seconds %d\n",
+                                         this.testEngine.getAvgFirstDecideTime());
+            this.outputFileWriter.printf("Average decide time after first call in nano-seconds %d\n",
+                                         this.testEngine.getAvgDecideTimeMultiple());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-openaz/blob/38b6d318/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/conformance/ConformancePIPEngine.java
----------------------------------------------------------------------
diff --git a/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/conformance/ConformancePIPEngine.java b/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/conformance/ConformancePIPEngine.java
index ce1c3e2..4bdeea7 100644
--- a/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/conformance/ConformancePIPEngine.java
+++ b/openaz-xacml-test/src/test/java/com/att/research/xacmlatt/pdp/test/conformance/ConformancePIPEngine.java
@@ -66,21 +66,20 @@ import com.att.research.xacml.std.pip.engines.ConfigurableEngine;
 import com.att.research.xacml.util.FactoryException;
 
 /**
- * ConformancePIPEngine implements the {@link com.att.research.xacml.api.pip.PIPFinder} interface to find attributes
- * loaded from a text file containing the following fields:
- *      category-id,attribute-id,datatype-id,issuer,value
- *
+ * ConformancePIPEngine implements the {@link com.att.research.xacml.api.pip.PIPFinder} interface to find
+ * attributes loaded from a text file containing the following fields:
+ * category-id,attribute-id,datatype-id,issuer,value
  */
 public class ConformancePIPEngine implements ConfigurableEngine {
     public static final String PROP_DESCRIPTION = ".description";
-    public static final String PROP_FILE                = ".file";
+    public static final String PROP_FILE = ".file";
 
-    private static final Log logger     = LogFactory.getLog(ConformancePIPEngine.class);
+    private static final Log logger = LogFactory.getLog(ConformancePIPEngine.class);
 
     private String name;
     private String description;
-    private Map<String,PIPResponse> cache       = new HashMap<String,PIPResponse>();
-    private List<Attribute> listAttributes      = new ArrayList<Attribute>();
+    private Map<String, PIPResponse> cache = new HashMap<String, PIPResponse>();
+    private List<Attribute> listAttributes = new ArrayList<Attribute>();
     private DataTypeFactory dataTypeFactory;
 
     public ConformancePIPEngine() {
@@ -89,18 +88,18 @@ public class ConformancePIPEngine implements ConfigurableEngine {
 
     protected DataTypeFactory getDataTypeFactory() throws FactoryException {
         if (this.dataTypeFactory == null) {
-            this.dataTypeFactory        = DataTypeFactory.newInstance();
+            this.dataTypeFactory = DataTypeFactory.newInstance();
         }
         return this.dataTypeFactory;
     }
 
     protected static String generateKey(PIPRequest pipRequest) {
-        StringBuilder stringBuilder     = new StringBuilder(pipRequest.getCategory().toString());
+        StringBuilder stringBuilder = new StringBuilder(pipRequest.getCategory().toString());
         stringBuilder.append('+');
         stringBuilder.append(pipRequest.getAttributeId().toString());
         stringBuilder.append('+');
         stringBuilder.append(pipRequest.getDataTypeId().toString());
-        String issuer   = pipRequest.getIssuer();
+        String issuer = pipRequest.getIssuer();
         if (issuer != null) {
             stringBuilder.append('+');
             stringBuilder.append(issuer);
@@ -109,44 +108,48 @@ public class ConformancePIPEngine implements ConfigurableEngine {
     }
 
     protected void store(String[] fields) throws FactoryException {
-        DataTypeFactory thisDataTypeFactory     = this.getDataTypeFactory();
-        Identifier identifierCategory           = new IdentifierImpl(fields[0]);
-        Identifier identifierAttribute          = new IdentifierImpl(fields[1]);
-        Identifier identifierDataType           = new IdentifierImpl(fields[2]);
-        String issuer                                           = (fields.length == 5 ? fields[3] : null);
-        String value                                            = fields[fields.length - 1];
-
-        DataType<?> dataType                            = thisDataTypeFactory.getDataType(identifierDataType);
+        DataTypeFactory thisDataTypeFactory = this.getDataTypeFactory();
+        Identifier identifierCategory = new IdentifierImpl(fields[0]);
+        Identifier identifierAttribute = new IdentifierImpl(fields[1]);
+        Identifier identifierDataType = new IdentifierImpl(fields[2]);
+        String issuer = (fields.length == 5 ? fields[3] : null);
+        String value = fields[fields.length - 1];
+
+        DataType<?> dataType = thisDataTypeFactory.getDataType(identifierDataType);
         if (dataType == null) {
             logger.error("Unknown data type " + identifierDataType.stringValue());
             return;
         }
 
-        AttributeValue<?> attributeValue        = null;
+        AttributeValue<?> attributeValue = null;
         try {
-            attributeValue      = dataType.createAttributeValue(value);
+            attributeValue = dataType.createAttributeValue(value);
         } catch (DataTypeException ex) {
             throw new FactoryException("DataTypeException creating AttributeValue", ex);
         }
-        Attribute attribute                                     = new StdMutableAttribute(identifierCategory, identifierAttribute, attributeValue, issuer, false);
+        Attribute attribute = new StdMutableAttribute(identifierCategory, identifierAttribute,
+                                                      attributeValue, issuer, false);
         this.listAttributes.add(attribute);
     }
 
     public void loadAttributes(File fileAttributes) throws IOException, ParseException, FactoryException {
         if (fileAttributes != null) {
             if (!fileAttributes.exists()) {
-                throw new FileNotFoundException("Attributes file " + fileAttributes.getAbsolutePath() + " not found.");
+                throw new FileNotFoundException("Attributes file " + fileAttributes.getAbsolutePath()
+                                                + " not found.");
             } else if (!fileAttributes.canRead()) {
-                throw new IOException("Attributes file " + fileAttributes.getAbsolutePath() + " is not readable.");
+                throw new IOException("Attributes file " + fileAttributes.getAbsolutePath()
+                                      + " is not readable.");
             }
 
-            BufferedReader bufferedReader       = null;
+            BufferedReader bufferedReader = null;
             try {
-                bufferedReader  = new BufferedReader(new InputStreamReader(new FileInputStream(fileAttributes)));
+                bufferedReader = new BufferedReader(
+                                                    new InputStreamReader(new FileInputStream(fileAttributes)));
                 String line;
                 while ((line = bufferedReader.readLine()) != null) {
                     if (line.length() > 0) {
-                        String[] fields = line.split("[|]",-1);
+                        String[] fields = line.split("[|]", -1);
                         if (fields.length < 4) {
                             logger.warn("Not enough fields in record \"" + line + "\"");
                             continue;
@@ -164,13 +167,14 @@ public class ConformancePIPEngine implements ConfigurableEngine {
     }
 
     protected Attribute findAttribute(PIPRequest pipRequest) {
-        Attribute attributeResult                       = null;
-        Iterator<Attribute> iterAttributes      = this.listAttributes.iterator();
+        Attribute attributeResult = null;
+        Iterator<Attribute> iterAttributes = this.listAttributes.iterator();
         while ((attributeResult == null) && iterAttributes.hasNext()) {
-            Attribute attributeTest     = iterAttributes.next();
-            if (pipRequest.getCategory().equals(attributeTest.getCategory()) &&
-                    pipRequest.getAttributeId().equals(attributeTest.getAttributeId()) &&
-                    (pipRequest.getIssuer() == null || pipRequest.getIssuer().equals(attributeTest.getIssuer()))) {
+            Attribute attributeTest = iterAttributes.next();
+            if (pipRequest.getCategory().equals(attributeTest.getCategory())
+                && pipRequest.getAttributeId().equals(attributeTest.getAttributeId())
+                && (pipRequest.getIssuer() == null || pipRequest.getIssuer()
+                    .equals(attributeTest.getIssuer()))) {
                 attributeResult = attributeTest;
             }
         }
@@ -179,29 +183,32 @@ public class ConformancePIPEngine implements ConfigurableEngine {
 
     @Override
     public PIPResponse getAttributes(PIPRequest pipRequest, PIPFinder pipFinder) throws PIPException {
-        String pipRequestKey    = generateKey(pipRequest);
+        String pipRequestKey = generateKey(pipRequest);
         PIPResponse pipResponse = this.cache.get(pipRequestKey);
         if (pipResponse != null) {
             return pipResponse;
         }
-        Attribute attributeMatch        = this.findAttribute(pipRequest);
+        Attribute attributeMatch = this.findAttribute(pipRequest);
         if (attributeMatch == null) {
             return StdPIPResponse.PIP_RESPONSE_EMPTY;
         }
         /*
          * Iterate through the values and only return the ones that match the requested data type
          */
-        List<AttributeValue<?>> matchingValues  = new ArrayList<AttributeValue<?>>();
+        List<AttributeValue<?>> matchingValues = new ArrayList<AttributeValue<?>>();
         Iterator<AttributeValue<?>> iterAttributeValues = attributeMatch.getValues().iterator();
         while (iterAttributeValues.hasNext()) {
-            AttributeValue<?> attributeValue    = iterAttributeValues.next();
+            AttributeValue<?> attributeValue = iterAttributeValues.next();
             if (pipRequest.getDataTypeId().equals(attributeValue.getDataTypeId())) {
                 matchingValues.add(attributeValue);
             }
         }
         if (matchingValues.size() > 0) {
-            Attribute attributeResponse = new StdMutableAttribute(attributeMatch.getCategory(), attributeMatch.getAttributeId(), matchingValues, attributeMatch.getIssuer(), false);
-            pipResponse                                 = new StdPIPResponse(attributeResponse);
+            Attribute attributeResponse = new StdMutableAttribute(attributeMatch.getCategory(),
+                                                                  attributeMatch.getAttributeId(),
+                                                                  matchingValues, attributeMatch.getIssuer(),
+                                                                  false);
+            pipResponse = new StdPIPResponse(attributeResponse);
             this.cache.put(pipRequestKey, pipResponse);
         }
         return pipResponse;
@@ -219,12 +226,12 @@ public class ConformancePIPEngine implements ConfigurableEngine {
 
     @Override
     public void configure(String id, Properties properties) throws PIPException {
-        this.name       = id;
-        this.description        = properties.getProperty(id + PROP_DESCRIPTION);
+        this.name = id;
+        this.description = properties.getProperty(id + PROP_DESCRIPTION);
         if (this.description == null) {
-            this.description    = "PIPEngine for the Conformance tests that loads attributes from a CSV file";
+            this.description = "PIPEngine for the Conformance tests that loads attributes from a CSV file";
         }
-        String pipFile          = properties.getProperty(id + PROP_FILE);
+        String pipFile = properties.getProperty(id + PROP_FILE);
         if (pipFile != null) {
             try {
                 this.loadAttributes(new File(pipFile));