Added tests and artifacts to demonstrate custom attribute identifiers/namespaces.
diff --git a/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/TestCustomNamespace.java b/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/TestCustomNamespace.java
new file mode 100644
index 0000000..3cd79b2
--- /dev/null
+++ b/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/TestCustomNamespace.java
@@ -0,0 +1,125 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ *
+ */
+
+package org.apache.openaz.pepapi.std.test;
+
+import org.apache.openaz.pepapi.*;
+import org.apache.openaz.pepapi.std.StdPepAgentFactory;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+public class TestCustomNamespace {
+
+    private PepAgentFactory pepAgentFactory;
+
+    @Before
+    public void setup() {
+        pepAgentFactory = new StdPepAgentFactory("properties/test-custom-namespace.xacml.properties");
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void testPepAgent() {
+        Assert.assertNotNull(getPepAgent());
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void testPermit() {
+        PepResponse response = getPepAgent().simpleDecide("Julius Hibbert", "read",
+                                                          "http://medico.com/record/patient/BartSimpson");
+        Assert.assertNotNull(response);
+        Assert.assertEquals(true, response.allowed());
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void testPermitWithLocationMatch() {
+        Subject subject = Subject.newInstance("Bob");
+        Action action = Action.newInstance("read");
+        Resource resource = Resource.newInstance(URI.create("/record/patient/Alice"))
+                .withLocation(URI.create("http://medical-records.com/"));
+        PepResponse response = getPepAgent().decide(subject, action, resource);
+        Assert.assertNotNull(response);
+        Assert.assertEquals(true, response.allowed());
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void testPermitWithLocationMismatch() {
+        Subject subject = Subject.newInstance("Bob");
+        Action action = Action.newInstance("read");
+        Resource resource = Resource.newInstance(URI.create("/record/patient/Alice"))
+                .withLocation(URI.create("http://restricted-records.com/"));
+        PepResponse response = getPepAgent().decide(subject, action, resource);
+        Assert.assertNotNull(response);
+        Assert.assertEquals(false, response.allowed());
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void testNotApplicable() {
+        PepResponse response = getPepAgent().simpleDecide("Julius Hibbert", "read",
+                                                          "http://medico.com/record/patient/JohnSmith");
+        Assert.assertNotNull(response);
+        Assert.assertEquals(false, response.allowed());
+    }
+
+    /**
+     *
+     */
+    @Test
+    public void testMultiRequest() {
+        List<Action> actions = new ArrayList<Action>();
+        actions.add(Action.newInstance("read"));
+        actions.add(Action.newInstance("write"));
+        actions.add(Action.newInstance("update"));
+        actions.add(Action.newInstance("delete"));
+
+        List<PepResponse> responses = getPepAgent()
+            .bulkDecide(actions, Subject.newInstance("Julius Hibbert"),
+                        Resource.newInstance("http://medico.com/record/patient/BartSimpson"));
+        Assert.assertNotNull(responses);
+        Assert.assertEquals(true, responses.get(0).allowed());
+        Assert.assertEquals(true, responses.get(1).allowed());
+        Assert.assertEquals(false, responses.get(2).allowed());
+        Assert.assertEquals(false, responses.get(3).allowed());
+
+    }
+
+    public PepAgent getPepAgent() {
+        return pepAgentFactory.getPepAgent();
+    }
+}
diff --git a/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/mapper/MyActionMapper.java b/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/mapper/MyActionMapper.java
new file mode 100644
index 0000000..99c9252
--- /dev/null
+++ b/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/mapper/MyActionMapper.java
@@ -0,0 +1,28 @@
+package org.apache.openaz.pepapi.std.test.mapper;
+
+import org.apache.openaz.pepapi.Action;
+import org.apache.openaz.pepapi.PepRequest;
+import org.apache.openaz.pepapi.PepRequestAttributes;
+import org.apache.openaz.pepapi.std.CategoryContainerMapper;
+import org.apache.openaz.xacml.api.XACML3;
+
+/**
+ * Created by ajithnair on 6/30/16.
+ */
+public class MyActionMapper extends CategoryContainerMapper {
+
+    private static final String MY_ACTION_ID = "my-namespace:action-id";
+
+    public MyActionMapper() {
+        super(Action.class);
+    }
+
+    @Override
+    public void map(Object o, PepRequest pepRequest) {
+        Action action = (Action) o;
+        PepRequestAttributes actionAttributes
+                = pepRequest.getPepRequestAttributes(XACML3.ID_ATTRIBUTE_CATEGORY_ACTION);
+        actionAttributes.addAttribute(MY_ACTION_ID, action.getId());
+        super.map(o, pepRequest);
+    }
+}
diff --git a/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/mapper/MyResourceMapper.java b/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/mapper/MyResourceMapper.java
new file mode 100644
index 0000000..4523854
--- /dev/null
+++ b/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/mapper/MyResourceMapper.java
@@ -0,0 +1,44 @@
+package org.apache.openaz.pepapi.std.test.mapper;
+
+import org.apache.openaz.pepapi.PepRequest;
+import org.apache.openaz.pepapi.PepRequestAttributes;
+import org.apache.openaz.pepapi.Resource;
+import org.apache.openaz.pepapi.std.CategoryContainerMapper;
+import org.apache.openaz.xacml.api.XACML3;
+import org.apache.openaz.xacml.api.pep.PEPException;
+
+import java.net.URI;
+
+/**
+ * Created by ajithnair on 7/1/16.
+ */
+public class MyResourceMapper extends CategoryContainerMapper {
+
+    private static final String MY_RESOURCE_ID = "my-namespace:resource-id";
+
+    private static final String MY_RESOURCE_LOCATION = "my-namespace:resource-location";
+
+    public MyResourceMapper() {
+        super(Resource.class);
+    }
+
+    @Override
+    public void map(Object o, PepRequest pepRequest) {
+        Resource resource = (Resource) o;
+        PepRequestAttributes resourceAttributes
+                = pepRequest.getPepRequestAttributes(XACML3.ID_ATTRIBUTE_CATEGORY_RESOURCE);
+        Object resourceId = resource.getId();
+        if (resourceId instanceof URI) {
+            resourceAttributes.addAttribute(MY_RESOURCE_ID, (URI) resourceId);
+        } else if (resourceId instanceof String) {
+            resourceAttributes.addAttribute(MY_RESOURCE_ID, (String) resourceId);
+        } else {
+            throw new IllegalArgumentException("Invalid type: " + resourceId.getClass());
+        }
+
+        if (resource.getLocation() != null) {
+            resourceAttributes.addAttribute(MY_RESOURCE_LOCATION, resource.getLocation());
+        }
+        super.map(o, pepRequest);
+    }
+}
diff --git a/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/mapper/MySubjectMapper.java b/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/mapper/MySubjectMapper.java
new file mode 100644
index 0000000..c7608b8
--- /dev/null
+++ b/openaz-pep/src/test/java/org/apache/openaz/pepapi/std/test/mapper/MySubjectMapper.java
@@ -0,0 +1,29 @@
+package org.apache.openaz.pepapi.std.test.mapper;
+
+import org.apache.openaz.pepapi.PepRequest;
+import org.apache.openaz.pepapi.PepRequestAttributes;
+import org.apache.openaz.pepapi.Subject;
+import org.apache.openaz.pepapi.std.CategoryContainerMapper;
+import org.apache.openaz.xacml.api.XACML3;
+
+/**
+ * Created by ajithnair on 6/30/16.
+ */
+public class MySubjectMapper extends CategoryContainerMapper {
+
+    private static final String MY_SUBJECT_ID = "my-namespace:subject-id";
+
+
+    public MySubjectMapper() {
+        super(Subject.class);
+    }
+
+    @Override
+    public void map(Object o, PepRequest pepRequest) {
+        Subject subject = (Subject) o;
+        PepRequestAttributes subjectAttributes
+                = pepRequest.getPepRequestAttributes(XACML3.ID_SUBJECT_CATEGORY_ACCESS_SUBJECT);
+        subjectAttributes.addAttribute(MY_SUBJECT_ID, subject.getId());
+        super.map(o, pepRequest);
+    }
+}
diff --git a/openaz-pep/src/test/resources/policies/test-custom-namespace.xml b/openaz-pep/src/test/resources/policies/test-custom-namespace.xml
new file mode 100755
index 0000000..4b9b823
--- /dev/null
+++ b/openaz-pep/src/test/resources/policies/test-custom-namespace.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        PolicyId="urn:oasis:names:tc:xacml:2.0:testapi:policy"
+        RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-overrides" Version="1.0"
+        xsi:schemaLocation="">
+    <Description></Description>
+    <Target/>
+    <Rule RuleId="urn:oasis:names:tc:xacml:1.0:testapi:rule-1" Effect="Permit">
+        <Description>
+            Julius Hibbert can read or write Bart Simpson's medical record.
+        </Description>
+        <Target>
+            <AnyOf>
+                <AllOf>
+                    <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+                        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Julius Hibbert</AttributeValue>
+                        <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
+                                             AttributeId="my-namespace:subject-id"
+                                             DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+                    </Match>
+                </AllOf>
+            </AnyOf>
+            <AnyOf>
+                <AllOf>
+                    <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+                        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">http://medico.com/record/patient/BartSimpson</AttributeValue>
+                        <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource"
+                                             AttributeId="my-namespace:resource-id"
+                                             DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+                    </Match>
+                </AllOf>
+            </AnyOf>
+            <AnyOf>
+                <AllOf>
+                    <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+                        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">read</AttributeValue>
+                        <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action"
+                                             AttributeId="my-namespace:action-id"
+                                             DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+                    </Match>
+                </AllOf>
+                <AllOf>
+                    <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+                        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">write</AttributeValue>
+                        <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action"
+                                             AttributeId="my-namespace:action-id"
+                                             DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+                    </Match>
+                </AllOf>
+            </AnyOf>
+        </Target>
+    </Rule>
+    <Rule RuleId="urn:oasis:names:tc:xacml:1.0:testapi:rule-2" Effect="Permit">
+        <Description />
+        <Target>
+            <AnyOf>
+                <AllOf>
+                    <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+                        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Bob</AttributeValue>
+                        <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
+                                             AttributeId="my-namespace:subject-id"
+                                             DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+                    </Match>
+                </AllOf>
+            </AnyOf>
+            <AnyOf>
+                <AllOf>
+                    <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:anyURI-equal">
+                        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">/record/patient/Alice</AttributeValue>
+                        <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource"
+                                             AttributeId="my-namespace:resource-id"
+                                             DataType="http://www.w3.org/2001/XMLSchema#anyURI" MustBePresent="false"/>
+                    </Match>
+                </AllOf>
+            </AnyOf>
+            <AnyOf>
+                <AllOf>
+                    <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:anyURI-equal">
+                        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://medical-records.com/</AttributeValue>
+                        <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource"
+                                             AttributeId="my-namespace:resource-location"
+                                             DataType="http://www.w3.org/2001/XMLSchema#anyURI" MustBePresent="false"/>
+                    </Match>
+                </AllOf>
+            </AnyOf>
+            <AnyOf>
+                <AllOf>
+                    <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
+                        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">read</AttributeValue>
+                        <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action"
+                                             AttributeId="my-namespace:action-id"
+                                             DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+                    </Match>
+                </AllOf>
+            </AnyOf>
+        </Target>
+    </Rule>
+</Policy>
diff --git a/openaz-pep/src/test/resources/properties/test-custom-namespace.xacml.properties b/openaz-pep/src/test/resources/properties/test-custom-namespace.xacml.properties
new file mode 100755
index 0000000..8f0e219
--- /dev/null
+++ b/openaz-pep/src/test/resources/properties/test-custom-namespace.xacml.properties
@@ -0,0 +1,24 @@
+# Default XACML Properties File
+# Standard API Factories
+#
+xacml.dataTypeFactory=org.apache.openaz.xacml.std.StdDataTypeFactory
+xacml.pdpEngineFactory=org.apache.openaz.xacml.pdp.OpenAZPDPEngineFactory
+xacml.pepEngineFactory=org.apache.openaz.xacml.std.pep.StdEngineFactory
+xacml.pipFinderFactory=org.apache.openaz.xacml.std.pip.StdPIPFinderFactory
+
+# OpenAZ PDP Implementation Factories
+#
+xacml.openaz.evaluationContextFactory=org.apache.openaz.xacml.pdp.std.StdEvaluationContextFactory
+xacml.openaz.combiningAlgorithmFactory=org.apache.openaz.xacml.pdp.std.StdCombiningAlgorithmFactory
+xacml.openaz.functionDefinitionFactory=org.apache.openaz.xacml.pdp.std.StdFunctionDefinitionFactory
+xacml.openaz.policyFinderFactory=org.apache.openaz.xacml.pdp.std.StdPolicyFinderFactory
+
+xacml.rootPolicies=testPolicy
+testPolicy.file=src/test/resources/policies/test-custom-namespace.xml
+
+# If there is a standard policy for the engine:
+# xacml.att.stdPolicyFinderFactory.rootPolicyFile=/etc/stdpolicyset.xml
+
+pep.mapper.classes=org.apache.openaz.pepapi.std.test.mapper.MyActionMapper,\
+  org.apache.openaz.pepapi.std.test.mapper.MySubjectMapper,\
+  org.apache.openaz.pepapi.std.test.mapper.MyResourceMapper