diff --git a/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyAvroEventContext.apex b/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyAvroEventContext.apex
index 265f924..9f62eca 100644
--- a/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyAvroEventContext.apex
+++ b/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyAvroEventContext.apex
@@ -82,7 +82,7 @@
 schema create name=CustomBoolean_type flavour=Avro schema=LS
 {
   "type"      : "record",
-  "name"      : "TestContextItem000",
+  "name"      : "TestContextBooleanItem",
   "namespace" : "org.onap.policy.apex.context.test.avro.concepts",
   "fields"    : [
     {"name": "flag", "type": "boolean"}
@@ -93,7 +93,7 @@
 schema create name=CustomByte_type flavour=Avro schema=LS
 {
   "type"      : "record",
-  "name"      : "TestContextItem001",
+  "name"      : "TestContextByteItem",
   "namespace" : "org.onap.policy.apex.context.test.avro.concepts",
   "fields"    : [
     {"name": "byteValue", "type": "int"}
@@ -104,7 +104,7 @@
 schema create name=CustomInteger_type flavour=Avro schema=LS
 {
   "type"      : "record",
-  "name"      : "TestContextItem002",
+  "name"      : "TestContextIntItem",
   "namespace" : "org.onap.policy.apex.context.test.avro.concepts",
   "fields"    : [
     {"name": "intValue", "type": "int"}
@@ -115,7 +115,7 @@
 schema create name=CustomLong_type flavour=Avro schema=LS
 {
   "type"      : "record",
-  "name"      : "TestContextItem003",
+  "name"      : "TestContextLongItem",
   "namespace" : "org.onap.policy.apex.context.test.avro.concepts",
   "fields"    : [
     {"name": "longValue", "type": "long"}
@@ -126,7 +126,7 @@
 schema create name=CustomFloat_type flavour=Avro schema=LS
 {
   "type"      : "record",
-  "name"      : "TestContextItem004",
+  "name"      : "TestContextFloatItem",
   "namespace" : "org.onap.policy.apex.context.test.avro.concepts",
   "fields"    : [
     {"name": "floatValue", "type": "float"}
@@ -137,7 +137,7 @@
 schema create name=CustomDouble_type flavour=Avro schema=LS
 {
   "type"      : "record",
-  "name"      : "TestContextItem005",
+  "name"      : "TestContextDoubleItem",
   "namespace" : "org.onap.policy.apex.context.test.avro.concepts",
   "fields"    : [
     {"name": "doubleValue", "type": "double"}
@@ -148,7 +148,7 @@
 schema create name=CustomString_type flavour=Avro schema=LS
 {
   "type"      : "record",
-  "name"      : "TestContextItem006",
+  "name"      : "TestContextStringItem",
   "namespace" : "org.onap.policy.apex.context.test.avro.concepts",
   "fields"    : [
     {"name": "stringValue", "type": "string"}
@@ -159,7 +159,7 @@
 schema create name=CustomALong_type flavour=Avro schema=LS
 {
   "type"      : "record",
-  "name"      : "TestContextItem007",
+  "name"      : "TestContextLongObjectItem",
   "namespace" : "org.onap.policy.apex.context.test.avro.concepts",
   "fields"    : [
     {"name": "longValue", "type": "long"}
@@ -170,7 +170,7 @@
 schema create name=CustomDate0_type flavour=Avro schema=LS
 {
   "type"      : "record",
-  "name"      : "TestContextItem008",
+  "name"      : "TestContextDateItem",
   "namespace" : "org.onap.policy.apex.context.test.avro.concepts",
   "fields"    : [
   	{"name": "time"       , "type": "long"},
@@ -188,7 +188,7 @@
 schema create name=CustomDate1_type flavour=Avro schema=LS
 {
   "type"      : "record",
-  "name"      : "TestContextItem009",
+  "name"      : "TestContextDateTzItem",
   "namespace" : "org.onap.policy.apex.context.test.avro.concepts",
   "fields"    : [
     {"name": "dateValue"     , "type": {
@@ -216,12 +216,12 @@
 schema create name=CustomDate2_type flavour=Avro schema=LS
 {
   "type"      : "record",
-  "name"      : "TestContextItem00A",
+  "name"      : "TestContextDateLocaleItem",
   "namespace" : "org.onap.policy.apex.context.test.avro.concepts",
   "fields"    : [
     {"name": "dateValue"     , "type": {
   		"type"      : "record",
- 	 	"name"      : "TestContextItem008",
+ 	 	"name"      : "TestContextDateItem",
 		"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
 		"fields"    : [
     		{"name": "time"       , "type": "long"},
@@ -247,7 +247,7 @@
 schema create name=CustomSet_type flavour=Avro schema=LS
 {
   "type"      : "record",
-  "name"      : "TestContextItem00B",
+  "name"      : "TestContextTreeSetItem",
   "namespace" : "org.onap.policy.apex.context.test.avro.concepts",
   "fields"    : [
     {"name": "setValue", "type": {
@@ -261,7 +261,7 @@
 schema create name=CustomMap_type flavour=Avro schema=LS
 {
   "type"      : "record",
-  "name"      : "TestContextItem00C",
+  "name"      : "TestContextTreeMapItem",
   "namespace" : "org.onap.policy.apex.context.test.avro.concepts",
   "fields"    : [
     {"name": "mapValue", "type": {
diff --git a/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyJavaEventContext.apex b/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyJavaEventContext.apex
index 8d17116..e978f15 100644
--- a/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyJavaEventContext.apex
+++ b/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyJavaEventContext.apex
@@ -28,19 +28,19 @@
 schema create name=JavaFloat_type     flavour=Java schema=java.lang.Float
 schema create name=JavaDouble_type    flavour=Java schema=java.lang.Double
 schema create name=JavaString_type    flavour=Java schema=java.lang.String
-schema create name=CustomBoolean_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem000
-schema create name=CustomByte_type    flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem001
-schema create name=CustomInteger_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem002
-schema create name=CustomLong_type    flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem003
-schema create name=CustomFloat_type   flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem004
-schema create name=CustomDouble_type  flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem005
-schema create name=CustomString_type  flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem006
-schema create name=CustomJLong_type   flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem007
-schema create name=CustomDate0_type   flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem008
-schema create name=CustomDate1_type   flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem009
-schema create name=CustomDate2_type   flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem00A
-schema create name=CustomSet_type     flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem00B
-schema create name=CustomMap_type     flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem00C
+schema create name=CustomBoolean_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextBooleanItem
+schema create name=CustomByte_type    flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextByteItem
+schema create name=CustomInteger_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextIntItem
+schema create name=CustomLong_type    flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextLongItem
+schema create name=CustomFloat_type   flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextFloatItem
+schema create name=CustomDouble_type  flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextDoubleItem
+schema create name=CustomString_type  flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextStringItem
+schema create name=CustomJLong_type   flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextLongObjectItem
+schema create name=CustomDate0_type   flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextDateItem
+schema create name=CustomDate1_type   flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextDateTzItem
+schema create name=CustomDate2_type   flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem
+schema create name=CustomSet_type     flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextTreeSetItem
+schema create name=CustomMap_type     flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextTreeMapItem
 
 event create name=Test_InputEvent nameSpace=org.onap.policy.apex.test source=External target=Apex
 
@@ -247,14 +247,14 @@
 customString .setStringValue(customString .getStringValue() + " added to end of string");
 customJLong  .setLongValue  (customJLong  .getLongValue()   + 1);
 
-customDate0Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextItem008");
+customDate0Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextDateItem");
 customDate0 = new customDate0Type(1499868391);
 
-customDate1Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextItem009");
+customDate1Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextDateTzItem");
 customDate1 = new customDate1Type();
 customDate1.setDateValue(customDate0);
 
-customDate2Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextItem00A");
+customDate2Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem");
 customDate2 = new customDate2Type();
 customDate2.setDateValue(customDate0);
 
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorEventsContext.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorEventsContext.java
index 6e489ad..bd75ddf 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorEventsContext.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorEventsContext.java
@@ -84,8 +84,8 @@
         final int logCharCount = logString.replaceAll(SPACES, EMPTY_STRING).length();
         final int modelCharCount = modelString.replaceAll(SPACES, EMPTY_STRING).length();
 
-        assertEquals(25911, logCharCount);
-        assertEquals(46138, modelCharCount);
+        assertEquals(25962, logCharCount);
+        assertEquals(46189, modelCharCount);
     }
 
     /**
@@ -114,8 +114,8 @@
         final int logCharCount = logString.replaceAll(SPACES, EMPTY_STRING).length();
         final int modelCharCount = modelString.replaceAll(SPACES, EMPTY_STRING).length();
 
-        assertEquals(30366, logCharCount);
-        assertEquals(52981, modelCharCount);
+        assertEquals(30407, logCharCount);
+        assertEquals(53022, modelCharCount);
 
     }
 
diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/DistributorParameters.java b/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/DistributorParameters.java
index 147e4eb..cb4c612 100644
--- a/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/DistributorParameters.java
+++ b/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/DistributorParameters.java
@@ -20,25 +20,27 @@
 
 package org.onap.policy.apex.context.parameters;
 
+import org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor;
 import org.onap.policy.apex.model.basicmodel.service.AbstractParameters;
 import org.onap.policy.apex.model.basicmodel.service.ParameterService;
 
 /**
- * An empty distributor parameter class that may be specialized by context distributor plugins that require plugin
- * specific parameters. The class defines the default distributor plugin as the JVM local distributor.
+ * An empty distributor parameter class that may be specialized by context distributor plugins that
+ * require plugin specific parameters. The class defines the default distributor plugin as the JVM
+ * local distributor.
  *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 public class DistributorParameters extends AbstractParameters {
     /** The default distributor makes context albums available to all threads in a single JVM. */
-    public static final String DEFAULT_DISTRIBUTOR_PLUGIN_CLASS =
-            "org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor";
+    public static final String DEFAULT_DISTRIBUTOR_PLUGIN_CLASS = JVMLocalDistributor.class.getCanonicalName();
 
     // Plugin class names
     private String pluginClass = DEFAULT_DISTRIBUTOR_PLUGIN_CLASS;
 
     /**
-     * Constructor to create a distributor parameters instance and register the instance with the parameter service.
+     * Constructor to create a distributor parameters instance and register the instance with the
+     * parameter service.
      */
     public DistributorParameters() {
         super(DistributorParameters.class.getCanonicalName());
@@ -46,8 +48,8 @@
     }
 
     /**
-     * Constructor to create a distributor parameters instance with the name of a sub class of this class and register
-     * the instance with the parameter service.
+     * Constructor to create a distributor parameters instance with the name of a sub class of this
+     * class and register the instance with the parameter service.
      *
      * @param parameterClassName the class name of a sub class of this class
      */
diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/LockManagerParameters.java b/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/LockManagerParameters.java
index 93e4223..1aaee2c 100644
--- a/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/LockManagerParameters.java
+++ b/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/LockManagerParameters.java
@@ -20,25 +20,29 @@
 
 package org.onap.policy.apex.context.parameters;
 
+import org.onap.policy.apex.context.impl.locking.jvmlocal.JVMLocalLockManager;
 import org.onap.policy.apex.model.basicmodel.service.AbstractParameters;
 import org.onap.policy.apex.model.basicmodel.service.ParameterService;
 
 /**
- * An empty lock manager parameter class that may be specialized by context lock manager plugins that require plugin
- * specific parameters. The class defines the default lock manager plugin as the JVM local lock manager.
+ * An empty lock manager parameter class that may be specialized by context lock manager plugins
+ * that require plugin specific parameters. The class defines the default lock manager plugin as the
+ * JVM local lock manager.
  *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 public class LockManagerParameters extends AbstractParameters {
-    /** The default lock manager can lock context album instance across all threads in a single JVM. */
-    public static final String DEFAULT_LOCK_MANAGER_PLUGIN_CLASS =
-            "org.onap.policy.apex.context.impl.locking.jvmlocal.JVMLocalLockManager";
+    /**
+     * The default lock manager can lock context album instance across all threads in a single JVM.
+     */
+    public static final String DEFAULT_LOCK_MANAGER_PLUGIN_CLASS = JVMLocalLockManager.class.getCanonicalName();
 
     // Plugin class names
     private String pluginClass = DEFAULT_LOCK_MANAGER_PLUGIN_CLASS;
 
     /**
-     * Constructor to create a lock manager parameters instance and register the instance with the parameter service.
+     * Constructor to create a lock manager parameters instance and register the instance with the
+     * parameter service.
      */
     public LockManagerParameters() {
         super(LockManagerParameters.class.getCanonicalName());
@@ -46,8 +50,8 @@
     }
 
     /**
-     * Constructor to create a lock manager parameters instance with the name of a sub class of this class and register
-     * the instance with the parameter service.
+     * Constructor to create a lock manager parameters instance with the name of a sub class of this
+     * class and register the instance with the parameter service.
      *
      * @param parameterClassName the class name of a sub class of this class
      */
diff --git a/context/context-test/pom.xml b/context/context-test-utils/pom.xml
similarity index 86%
rename from context/context-test/pom.xml
rename to context/context-test-utils/pom.xml
index ded707a..dc8ec6e 100644
--- a/context/context-test/pom.xml
+++ b/context/context-test-utils/pom.xml
@@ -26,9 +26,9 @@
         <version>2.0.0-SNAPSHOT</version>
     </parent>
 
-    <artifactId>context-test</artifactId>
+    <artifactId>context-test-utils</artifactId>
     <name>${project.artifactId}</name>
-    <description>[${project.parent.artifactId}] module to hold test context date for testing</description>
+    <description>[${project.parent.artifactId}] module contain default distributor tests and common test utils</description>
 
     <dependencies>
         <dependency>
@@ -51,5 +51,10 @@
             <version>${version.derby}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
 </project>
\ No newline at end of file
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem000.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextBooleanItem.java
similarity index 91%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem000.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextBooleanItem.java
index 49e5278..7f019f5 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem000.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextBooleanItem.java
@@ -25,7 +25,7 @@
 /**
  * The Class TestContextItem000.
  */
-public class TestContextItem000 implements Serializable {
+public class TestContextBooleanItem implements Serializable {
     private static final int HASH_PRIME_1 = 31;
     private static final int HASH_PRIME_2 = 1231;
     private static final int HASH_PRIME_3 = 1237;
@@ -37,14 +37,14 @@
     /**
      * The Constructor.
      */
-    public TestContextItem000() {}
+    public TestContextBooleanItem() {}
 
     /**
      * The Constructor.
      *
      * @param flag the flag
      */
-    public TestContextItem000(final Boolean flag) {
+    public TestContextBooleanItem(final Boolean flag) {
         this.flag = flag;
     }
 
@@ -95,7 +95,7 @@
         if (getClass() != obj.getClass()) {
             return false;
         }
-        final TestContextItem000 other = (TestContextItem000) obj;
+        final TestContextBooleanItem other = (TestContextBooleanItem) obj;
         if (flag != other.flag) {
             return false;
         }
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem001.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextByteItem.java
similarity index 91%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem001.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextByteItem.java
index 5d41269..2b107b4 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem001.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextByteItem.java
@@ -25,7 +25,7 @@
 /**
  * The Class TestContextItem001.
  */
-public class TestContextItem001 implements Serializable {
+public class TestContextByteItem implements Serializable {
     private static final long serialVersionUID = 1361938145823720386L;
 
     private static final int HASH_PRIME_1 = 31;
@@ -35,14 +35,14 @@
     /**
      * The Constructor.
      */
-    public TestContextItem001() {}
+    public TestContextByteItem() {}
 
     /**
      * The Constructor.
      *
      * @param byteValue the byte value
      */
-    public TestContextItem001(final Byte byteValue) {
+    public TestContextByteItem(final Byte byteValue) {
         this.byteValue = byteValue;
     }
 
@@ -93,7 +93,7 @@
         if (getClass() != obj.getClass()) {
             return false;
         }
-        final TestContextItem001 other = (TestContextItem001) obj;
+        final TestContextByteItem other = (TestContextByteItem) obj;
         if (byteValue != other.byteValue) {
             return false;
         }
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem008.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateItem.java
similarity index 94%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem008.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateItem.java
index 82a02a8..f7c8490 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem008.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateItem.java
@@ -28,7 +28,7 @@
 /**
  * The Class TestContextItem008.
  */
-public class TestContextItem008 implements Serializable {
+public class TestContextDateItem implements Serializable {
     private static final long serialVersionUID = -6984963129968805460L;
 
     private static final int HASH_PRIME_1 = 31;
@@ -47,7 +47,7 @@
     /**
      * The Constructor.
      */
-    public TestContextItem008() {
+    public TestContextDateItem() {
         this(new Date(System.currentTimeMillis()));
     }
 
@@ -56,7 +56,7 @@
      *
      * @param dateValue the date value
      */
-    public TestContextItem008(final Date dateValue) {
+    public TestContextDateItem(final Date dateValue) {
         setDateValue(dateValue.getTime());
     }
 
@@ -65,7 +65,7 @@
      *
      * @param time the time
      */
-    public TestContextItem008(final long time) {
+    public TestContextDateItem(final long time) {
         setDateValue(time);
     }
 
@@ -217,7 +217,7 @@
         if (getClass() != obj.getClass()) {
             return false;
         }
-        final TestContextItem008 other = (TestContextItem008) obj;
+        final TestContextDateItem other = (TestContextDateItem) obj;
         if (day != other.day) {
             return false;
         }
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem00A.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateLocaleItem.java
similarity index 91%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem00A.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateLocaleItem.java
index db380cc..0c94bcb 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem00A.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateLocaleItem.java
@@ -27,14 +27,14 @@
 /**
  * The Class TestContextItem00A.
  */
-public class TestContextItem00A implements Serializable {
+public class TestContextDateLocaleItem implements Serializable {
     private static final long serialVersionUID = -6579903685538233754L;
 
     private static final int HASH_PRIME_1 = 31;
     private static final int HASH_PRIME_2 = 1231;
     private static final int HASH_PRIME_3 = 1237;
 
-    private TestContextItem008 dateValue = new TestContextItem008(System.currentTimeMillis());
+    private TestContextDateItem dateValue = new TestContextDateItem(System.currentTimeMillis());
     private String timeZoneString = TimeZone.getTimeZone("Europe/Dublin").getDisplayName();
     private boolean dst = false;
     private int utcOffset = 0;
@@ -44,7 +44,7 @@
     /**
      * The Constructor.
      */
-    public TestContextItem00A() {}
+    public TestContextDateLocaleItem() {}
 
     /**
      * The Constructor.
@@ -56,7 +56,7 @@
      * @param language the language
      * @param country the country
      */
-    public TestContextItem00A(final TestContextItem008 dateValue, final String tzValue, final boolean dst,
+    public TestContextDateLocaleItem(final TestContextDateItem dateValue, final String tzValue, final boolean dst,
             final int utcOffset, final String language, final String country) {
         this.dateValue = dateValue;
         this.timeZoneString = TimeZone.getTimeZone(tzValue).getDisplayName();
@@ -73,7 +73,7 @@
      *
      * @param original the original
      */
-    public TestContextItem00A(final TestContextItem00A original) {
+    public TestContextDateLocaleItem(final TestContextDateLocaleItem original) {
         this.dateValue = original.dateValue;
         this.timeZoneString = TimeZone.getTimeZone(original.timeZoneString).getDisplayName();
         this.dst = original.dst;
@@ -89,7 +89,7 @@
      *
      * @return the date value
      */
-    public TestContextItem008 getDateValue() {
+    public TestContextDateItem getDateValue() {
         return dateValue;
     }
 
@@ -98,7 +98,7 @@
      *
      * @param dateValue the date value
      */
-    public void setDateValue(final TestContextItem008 dateValue) {
+    public void setDateValue(final TestContextDateItem dateValue) {
         this.dateValue = dateValue;
     }
 
@@ -209,7 +209,7 @@
         if (getClass() != obj.getClass()) {
             return false;
         }
-        final TestContextItem00A other = (TestContextItem00A) obj;
+        final TestContextDateLocaleItem other = (TestContextDateLocaleItem) obj;
         if (dateValue == null) {
             if (other.dateValue != null) {
                 return false;
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem009.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateTzItem.java
similarity index 88%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem009.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateTzItem.java
index f3e8953..7d3ed80 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem009.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDateTzItem.java
@@ -26,21 +26,21 @@
 /**
  * The Class TestContextItem009.
  */
-public class TestContextItem009 implements Serializable {
+public class TestContextDateTzItem implements Serializable {
     private static final long serialVersionUID = 5604426823170331706L;
 
     private static final int HASH_PRIME_1 = 31;
     private static final int HASH_PRIME_2 = 1231;
     private static final int HASH_PRIME_3 = 1237;
 
-    private TestContextItem008 dateValue = new TestContextItem008(System.currentTimeMillis());
+    private TestContextDateItem dateValue = new TestContextDateItem(System.currentTimeMillis());
     private String timeZoneString = TimeZone.getTimeZone("Europe/Dublin").getDisplayName();
     private boolean dst = false;
 
     /**
      * The Constructor.
      */
-    public TestContextItem009() {
+    public TestContextDateTzItem() {
         dst = true;
     }
 
@@ -51,7 +51,7 @@
      * @param tzValue the tz value
      * @param dst the dst
      */
-    public TestContextItem009(final TestContextItem008 dateValue, final String tzValue, final boolean dst) {
+    public TestContextDateTzItem(final TestContextDateItem dateValue, final String tzValue, final boolean dst) {
         this.dateValue = dateValue;
         this.timeZoneString = TimeZone.getTimeZone(tzValue).getDisplayName();
         this.dst = dst;
@@ -62,7 +62,7 @@
      *
      * @param original the original
      */
-    public TestContextItem009(final TestContextItem009 original) {
+    public TestContextDateTzItem(final TestContextDateTzItem original) {
         this.dateValue = original.dateValue;
         this.timeZoneString = original.timeZoneString;
         this.dst = original.dst;
@@ -73,7 +73,7 @@
      *
      * @return the date value
      */
-    public TestContextItem008 getDateValue() {
+    public TestContextDateItem getDateValue() {
         return dateValue;
     }
 
@@ -82,7 +82,7 @@
      *
      * @param dateValue the date value
      */
-    public void setDateValue(final TestContextItem008 dateValue) {
+    public void setDateValue(final TestContextDateItem dateValue) {
         this.dateValue = dateValue;
     }
 
@@ -153,7 +153,7 @@
         if (getClass() != obj.getClass()) {
             return false;
         }
-        final TestContextItem009 other = (TestContextItem009) obj;
+        final TestContextDateTzItem other = (TestContextDateTzItem) obj;
         if (dateValue == null) {
             if (other.dateValue != null) {
                 return false;
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem005.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDoubleItem.java
similarity index 91%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem005.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDoubleItem.java
index d8a3352..ac4f506 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem005.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDoubleItem.java
@@ -25,7 +25,7 @@
 /**
  * The Class TestContextItem005.
  */
-public class TestContextItem005 implements Serializable {
+public class TestContextDoubleItem implements Serializable {
     private static final long serialVersionUID = -2958758261076734821L;
 
     private static final int HASH_PRIME_1 = 31;
@@ -36,14 +36,14 @@
     /**
      * The Constructor.
      */
-    public TestContextItem005() {}
+    public TestContextDoubleItem() {}
 
     /**
      * The Constructor.
      *
      * @param doubleValue the double value
      */
-    public TestContextItem005(final Double doubleValue) {
+    public TestContextDoubleItem(final Double doubleValue) {
         this.doubleValue = doubleValue;
     }
 
@@ -96,7 +96,7 @@
         if (getClass() != obj.getClass()) {
             return false;
         }
-        final TestContextItem005 other = (TestContextItem005) obj;
+        final TestContextDoubleItem other = (TestContextDoubleItem) obj;
         if (Double.doubleToLongBits(doubleValue) != Double.doubleToLongBits(other.doubleValue)) {
             return false;
         }
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem004.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextFloatItem.java
similarity index 91%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem004.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextFloatItem.java
index 1370db1..cd81652 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem004.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextFloatItem.java
@@ -25,7 +25,7 @@
 /**
  * The Class TestContextItem004.
  */
-public class TestContextItem004 implements Serializable {
+public class TestContextFloatItem implements Serializable {
     private static final long serialVersionUID = -3359180576903272400L;
 
     private static final int HASH_PRIME_1 = 31;
@@ -35,14 +35,14 @@
     /**
      * The Constructor.
      */
-    public TestContextItem004() {}
+    public TestContextFloatItem() {}
 
     /**
      * The Constructor.
      *
      * @param floatValue the float value
      */
-    public TestContextItem004(final Float floatValue) {
+    public TestContextFloatItem(final Float floatValue) {
         this.floatValue = floatValue;
     }
 
@@ -93,7 +93,7 @@
         if (getClass() != obj.getClass()) {
             return false;
         }
-        final TestContextItem004 other = (TestContextItem004) obj;
+        final TestContextFloatItem other = (TestContextFloatItem) obj;
         if (Float.floatToIntBits(floatValue) != Float.floatToIntBits(other.floatValue)) {
             return false;
         }
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem002.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextIntItem.java
similarity index 90%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem002.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextIntItem.java
index 3b5242f..8983027 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem002.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextIntItem.java
@@ -25,7 +25,7 @@
 /**
  * The Class TestContextItem002.
  */
-public class TestContextItem002 implements Serializable {
+public class TestContextIntItem implements Serializable {
     private static final long serialVersionUID = -8978435658277900984L;
 
     private static final int HASH_PRIME_1 = 31;
@@ -35,14 +35,14 @@
     /**
      * The Constructor.
      */
-    public TestContextItem002() {}
+    public TestContextIntItem() {}
 
     /**
      * The Constructor.
      *
      * @param intValue the int value
      */
-    public TestContextItem002(final Integer intValue) {
+    public TestContextIntItem(final Integer intValue) {
         this.intValue = intValue;
     }
 
@@ -51,7 +51,7 @@
      *
      * @param original the original
      */
-    public TestContextItem002(final TestContextItem002 original) {
+    public TestContextIntItem(final TestContextIntItem original) {
         this.intValue = original.intValue;
     }
 
@@ -102,7 +102,7 @@
         if (getClass() != obj.getClass()) {
             return false;
         }
-        final TestContextItem002 other = (TestContextItem002) obj;
+        final TestContextIntItem other = (TestContextIntItem) obj;
         if (intValue != other.intValue) {
             return false;
         }
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem003.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextLongItem.java
similarity index 91%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem003.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextLongItem.java
index e7532ec..be3ee60 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem003.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextLongItem.java
@@ -25,7 +25,7 @@
 /**
  * The Class TestContextItem003.
  */
-public class TestContextItem003 implements Serializable {
+public class TestContextLongItem implements Serializable {
     private static final long serialVersionUID = 3599267534512489386L;
 
     private static final int HASH_PRIME_1 = 31;
@@ -36,14 +36,14 @@
     /**
      * The Constructor.
      */
-    public TestContextItem003() {}
+    public TestContextLongItem() {}
 
     /**
      * The Constructor.
      *
      * @param longValue the long value
      */
-    public TestContextItem003(final Long longValue) {
+    public TestContextLongItem(final Long longValue) {
         this.longValue = longValue;
     }
 
@@ -94,7 +94,7 @@
         if (getClass() != obj.getClass()) {
             return false;
         }
-        final TestContextItem003 other = (TestContextItem003) obj;
+        final TestContextLongItem other = (TestContextLongItem) obj;
         if (longValue != other.longValue) {
             return false;
         }
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem007.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextLongObjectItem.java
similarity index 91%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem007.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextLongObjectItem.java
index 21c6f8c..215868d 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem007.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextLongObjectItem.java
@@ -25,7 +25,7 @@
 /**
  * The Class TestContextItem007.
  */
-public class TestContextItem007 implements Serializable {
+public class TestContextLongObjectItem implements Serializable {
     private static final long serialVersionUID = -1029406737866392421L;
 
     private static final int HASH_PRIME_1 = 31;
@@ -35,14 +35,14 @@
     /**
      * The Constructor.
      */
-    public TestContextItem007() {}
+    public TestContextLongObjectItem() {}
 
     /**
      * The Constructor.
      *
      * @param longValue the long value
      */
-    public TestContextItem007(final Long longValue) {
+    public TestContextLongObjectItem(final Long longValue) {
         this.longValue = longValue;
     }
 
@@ -93,7 +93,7 @@
         if (getClass() != obj.getClass()) {
             return false;
         }
-        final TestContextItem007 other = (TestContextItem007) obj;
+        final TestContextLongObjectItem other = (TestContextLongObjectItem) obj;
         if (longValue == null) {
             if (other.longValue != null) {
                 return false;
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem006.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextStringItem.java
similarity index 91%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem006.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextStringItem.java
index 5fd2f9d..6c9fcb4 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem006.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextStringItem.java
@@ -25,7 +25,7 @@
 /**
  * The Class TestContextItem006.
  */
-public class TestContextItem006 implements Serializable {
+public class TestContextStringItem implements Serializable {
     private static final long serialVersionUID = -1074772190611125121L;
 
     private static final int HASH_PRIME_1 = 31;
@@ -35,14 +35,14 @@
     /**
      * The Constructor.
      */
-    public TestContextItem006() {}
+    public TestContextStringItem() {}
 
     /**
      * The Constructor.
      *
      * @param stringValue the string value
      */
-    public TestContextItem006(final String stringValue) {
+    public TestContextStringItem(final String stringValue) {
         this.stringValue = stringValue;
     }
 
@@ -93,7 +93,7 @@
         if (getClass() != obj.getClass()) {
             return false;
         }
-        final TestContextItem006 other = (TestContextItem006) obj;
+        final TestContextStringItem other = (TestContextStringItem) obj;
         if (stringValue == null) {
             if (other.stringValue != null) {
                 return false;
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem00C.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextTreeMapItem.java
similarity index 91%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem00C.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextTreeMapItem.java
index 6c91297..eed0c1a 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem00C.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextTreeMapItem.java
@@ -27,7 +27,7 @@
 /**
  * The Class TestContextItem00C.
  */
-public class TestContextItem00C implements Serializable {
+public class TestContextTreeMapItem implements Serializable {
     private static final long serialVersionUID = -7497746259264651884L;
 
     private static final int HASH_PRIME_1 = 31;
@@ -37,14 +37,14 @@
     /**
      * The Constructor.
      */
-    public TestContextItem00C() {}
+    public TestContextTreeMapItem() {}
 
     /**
      * The Constructor.
      *
      * @param mapValue the map value
      */
-    public TestContextItem00C(final Map<String, String> mapValue) {
+    public TestContextTreeMapItem(final Map<String, String> mapValue) {
         this.mapValue = mapValue;
     }
 
@@ -98,7 +98,7 @@
         if (getClass() != obj.getClass()) {
             return false;
         }
-        final TestContextItem00C other = (TestContextItem00C) obj;
+        final TestContextTreeMapItem other = (TestContextTreeMapItem) obj;
         if (mapValue == null) {
             if (other.mapValue != null) {
                 return false;
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem00B.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextTreeSetItem.java
similarity index 90%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem00B.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextTreeSetItem.java
index 4990b1b..fe47c1a 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextItem00B.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextTreeSetItem.java
@@ -27,7 +27,7 @@
 /**
  * The Class TestContextItem00B.
  */
-public class TestContextItem00B implements Serializable {
+public class TestContextTreeSetItem implements Serializable {
     private static final long serialVersionUID = 1254589722957250388L;
 
     private static final int HASH_PRIME_1 = 31;
@@ -37,21 +37,21 @@
     /**
      * The Constructor.
      */
-    public TestContextItem00B() {}
+    public TestContextTreeSetItem() {}
 
     /**
      * The Constructor.
      *
      * @param setArray the set array
      */
-    public TestContextItem00B(final String[] setArray) {}
+    public TestContextTreeSetItem(final String[] setArray) {}
 
     /**
      * The Constructor.
      *
      * @param setValue the set value
      */
-    public TestContextItem00B(final TreeSet<String> setValue) {
+    public TestContextTreeSetItem(final TreeSet<String> setValue) {
         this.setValue = setValue;
     }
 
@@ -105,7 +105,7 @@
         if (getClass() != obj.getClass()) {
             return false;
         }
-        final TestContextItem00B other = (TestContextItem00B) obj;
+        final TestContextTreeSetItem other = (TestContextTreeSetItem) obj;
         if (setValue == null) {
             if (other.setValue != null) {
                 return false;
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestExternalContextItem.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestExternalContextItem.java
similarity index 81%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestExternalContextItem.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestExternalContextItem.java
index 11a1af1..5c63c2e 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestExternalContextItem.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestExternalContextItem.java
@@ -30,26 +30,26 @@
 
     private static final int HASH_PRIME_1 = 31;
 
-    private TestContextItem000 testExternalContextItem000;
-    private TestContextItem001 testExternalContextItem001;
-    private TestContextItem002 testExternalContextItem002;
-    private TestContextItem003 testExternalContextItem003;
-    private TestContextItem004 testExternalContextItem004;
-    private TestContextItem005 testExternalContextItem005;
-    private TestContextItem006 testExternalContextItem006;
-    private TestContextItem007 testExternalContextItem007;
-    private TestContextItem008 testExternalContextItem008;
-    private TestContextItem009 testExternalContextItem009;
-    private TestContextItem00A testExternalContextItem00A;
-    private TestContextItem00B testExternalContextItem00B;
-    private TestContextItem00C testExternalContextItem00C;
+    private TestContextBooleanItem testExternalContextItem000;
+    private TestContextByteItem testExternalContextItem001;
+    private TestContextIntItem testExternalContextItem002;
+    private TestContextLongItem testExternalContextItem003;
+    private TestContextFloatItem testExternalContextItem004;
+    private TestContextDoubleItem testExternalContextItem005;
+    private TestContextStringItem testExternalContextItem006;
+    private TestContextLongObjectItem testExternalContextItem007;
+    private TestContextDateItem testExternalContextItem008;
+    private TestContextDateTzItem testExternalContextItem009;
+    private TestContextDateLocaleItem testExternalContextItem00A;
+    private TestContextTreeSetItem testExternalContextItem00B;
+    private TestContextTreeMapItem testExternalContextItem00C;
 
     /**
      * Gets the test external context item 000.
      *
      * @return the test external context item 000
      */
-    public TestContextItem000 getTestExternalContextItem000() {
+    public TestContextBooleanItem getTestExternalContextItem000() {
         return testExternalContextItem000;
     }
 
@@ -58,7 +58,7 @@
      *
      * @param testExternalContextItem000 the test external context item 000
      */
-    public void setTestExternalContextItem000(final TestContextItem000 testExternalContextItem000) {
+    public void setTestExternalContextItem000(final TestContextBooleanItem testExternalContextItem000) {
         this.testExternalContextItem000 = testExternalContextItem000;
     }
 
@@ -67,7 +67,7 @@
      *
      * @return the test external context item 001
      */
-    public TestContextItem001 getTestExternalContextItem001() {
+    public TestContextByteItem getTestExternalContextItem001() {
         return testExternalContextItem001;
     }
 
@@ -76,7 +76,7 @@
      *
      * @param testExternalContextItem001 the test external context item 001
      */
-    public void setTestExternalContextItem001(final TestContextItem001 testExternalContextItem001) {
+    public void setTestExternalContextItem001(final TestContextByteItem testExternalContextItem001) {
         this.testExternalContextItem001 = testExternalContextItem001;
     }
 
@@ -85,7 +85,7 @@
      *
      * @return the test external context item 002
      */
-    public TestContextItem002 getTestExternalContextItem002() {
+    public TestContextIntItem getTestExternalContextItem002() {
         return testExternalContextItem002;
     }
 
@@ -94,7 +94,7 @@
      *
      * @param testExternalContextItem002 the test external context item 002
      */
-    public void setTestExternalContextItem002(final TestContextItem002 testExternalContextItem002) {
+    public void setTestExternalContextItem002(final TestContextIntItem testExternalContextItem002) {
         this.testExternalContextItem002 = testExternalContextItem002;
     }
 
@@ -103,7 +103,7 @@
      *
      * @return the test external context item 003
      */
-    public TestContextItem003 getTestExternalContextItem003() {
+    public TestContextLongItem getTestExternalContextItem003() {
         return testExternalContextItem003;
     }
 
@@ -112,7 +112,7 @@
      *
      * @param testExternalContextItem003 the test external context item 003
      */
-    public void setTestExternalContextItem003(final TestContextItem003 testExternalContextItem003) {
+    public void setTestExternalContextItem003(final TestContextLongItem testExternalContextItem003) {
         this.testExternalContextItem003 = testExternalContextItem003;
     }
 
@@ -121,7 +121,7 @@
      *
      * @return the test external context item 004
      */
-    public TestContextItem004 getTestExternalContextItem004() {
+    public TestContextFloatItem getTestExternalContextItem004() {
         return testExternalContextItem004;
     }
 
@@ -130,7 +130,7 @@
      *
      * @param testExternalContextItem004 the test external context item 004
      */
-    public void setTestExternalContextItem004(final TestContextItem004 testExternalContextItem004) {
+    public void setTestExternalContextItem004(final TestContextFloatItem testExternalContextItem004) {
         this.testExternalContextItem004 = testExternalContextItem004;
     }
 
@@ -139,7 +139,7 @@
      *
      * @return the test external context item 005
      */
-    public TestContextItem005 getTestExternalContextItem005() {
+    public TestContextDoubleItem getTestExternalContextItem005() {
         return testExternalContextItem005;
     }
 
@@ -148,7 +148,7 @@
      *
      * @param testExternalContextItem005 the test external context item 005
      */
-    public void setTestExternalContextItem005(final TestContextItem005 testExternalContextItem005) {
+    public void setTestExternalContextItem005(final TestContextDoubleItem testExternalContextItem005) {
         this.testExternalContextItem005 = testExternalContextItem005;
     }
 
@@ -157,7 +157,7 @@
      *
      * @return the test external context item 006
      */
-    public TestContextItem006 getTestExternalContextItem006() {
+    public TestContextStringItem getTestExternalContextItem006() {
         return testExternalContextItem006;
     }
 
@@ -166,7 +166,7 @@
      *
      * @param testExternalContextItem006 the test external context item 006
      */
-    public void setTestExternalContextItem006(final TestContextItem006 testExternalContextItem006) {
+    public void setTestExternalContextItem006(final TestContextStringItem testExternalContextItem006) {
         this.testExternalContextItem006 = testExternalContextItem006;
     }
 
@@ -175,7 +175,7 @@
      *
      * @return the test external context item 007
      */
-    public TestContextItem007 getTestExternalContextItem007() {
+    public TestContextLongObjectItem getTestExternalContextItem007() {
         return testExternalContextItem007;
     }
 
@@ -184,7 +184,7 @@
      *
      * @param testExternalContextItem007 the test external context item 007
      */
-    public void setTestExternalContextItem007(final TestContextItem007 testExternalContextItem007) {
+    public void setTestExternalContextItem007(final TestContextLongObjectItem testExternalContextItem007) {
         this.testExternalContextItem007 = testExternalContextItem007;
     }
 
@@ -193,7 +193,7 @@
      *
      * @return the test external context item 008
      */
-    public TestContextItem008 getTestExternalContextItem008() {
+    public TestContextDateItem getTestExternalContextItem008() {
         return testExternalContextItem008;
     }
 
@@ -202,7 +202,7 @@
      *
      * @param testExternalContextItem008 the test external context item 008
      */
-    public void setTestExternalContextItem008(final TestContextItem008 testExternalContextItem008) {
+    public void setTestExternalContextItem008(final TestContextDateItem testExternalContextItem008) {
         this.testExternalContextItem008 = testExternalContextItem008;
     }
 
@@ -211,7 +211,7 @@
      *
      * @return the test external context item 009
      */
-    public TestContextItem009 getTestExternalContextItem009() {
+    public TestContextDateTzItem getTestExternalContextItem009() {
         return testExternalContextItem009;
     }
 
@@ -220,7 +220,7 @@
      *
      * @param testExternalContextItem009 the test external context item 009
      */
-    public void setTestExternalContextItem009(final TestContextItem009 testExternalContextItem009) {
+    public void setTestExternalContextItem009(final TestContextDateTzItem testExternalContextItem009) {
         this.testExternalContextItem009 = testExternalContextItem009;
     }
 
@@ -229,7 +229,7 @@
      *
      * @return the test external context item 00 A
      */
-    public TestContextItem00A getTestExternalContextItem00A() {
+    public TestContextDateLocaleItem getTestExternalContextItem00A() {
         return testExternalContextItem00A;
     }
 
@@ -238,7 +238,7 @@
      *
      * @param testExternalContextItem00A the test external context item 00 A
      */
-    public void setTestExternalContextItem00A(final TestContextItem00A testExternalContextItem00A) {
+    public void setTestExternalContextItem00A(final TestContextDateLocaleItem testExternalContextItem00A) {
         this.testExternalContextItem00A = testExternalContextItem00A;
     }
 
@@ -247,7 +247,7 @@
      *
      * @return the test external context item 00 B
      */
-    public TestContextItem00B getTestExternalContextItem00B() {
+    public TestContextTreeSetItem getTestExternalContextItem00B() {
         return testExternalContextItem00B;
     }
 
@@ -256,7 +256,7 @@
      *
      * @param testExternalContextItem00B the test external context item 00 B
      */
-    public void setTestExternalContextItem00B(final TestContextItem00B testExternalContextItem00B) {
+    public void setTestExternalContextItem00B(final TestContextTreeSetItem testExternalContextItem00B) {
         this.testExternalContextItem00B = testExternalContextItem00B;
     }
 
@@ -265,7 +265,7 @@
      *
      * @return the test external context item 00 C
      */
-    public TestContextItem00C getTestExternalContextItem00C() {
+    public TestContextTreeMapItem getTestExternalContextItem00C() {
         return testExternalContextItem00C;
     }
 
@@ -274,7 +274,7 @@
      *
      * @param testExternalContextItem00C the test external context item 00 C
      */
-    public void setTestExternalContextItem00C(final TestContextItem00C testExternalContextItem00C) {
+    public void setTestExternalContextItem00C(final TestContextTreeMapItem testExternalContextItem00C) {
         this.testExternalContextItem00C = testExternalContextItem00C;
     }
 
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestGlobalContextItem.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestGlobalContextItem.java
similarity index 81%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestGlobalContextItem.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestGlobalContextItem.java
index 2e893d9..9953a1a 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestGlobalContextItem.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestGlobalContextItem.java
@@ -30,26 +30,26 @@
 
     private static final int HASH_PRIME_1 = 31;
 
-    private TestContextItem000 testGlobalContextItem000;
-    private TestContextItem001 testGlobalContextItem001;
-    private TestContextItem002 testGlobalContextItem002;
-    private TestContextItem003 testGlobalContextItem003;
-    private TestContextItem004 testGlobalContextItem004;
-    private TestContextItem005 testGlobalContextItem005;
-    private TestContextItem006 testGlobalContextItem006;
-    private TestContextItem007 testGlobalContextItem007;
-    private TestContextItem008 testGlobalContextItem008;
-    private TestContextItem009 testGlobalContextItem009;
-    private TestContextItem00A testGlobalContextItem00A;
-    private TestContextItem00B testGlobalContextItem00B;
-    private TestContextItem00C testGlobalContextItem00C;
+    private TestContextBooleanItem testGlobalContextItem000;
+    private TestContextByteItem testGlobalContextItem001;
+    private TestContextIntItem testGlobalContextItem002;
+    private TestContextLongItem testGlobalContextItem003;
+    private TestContextFloatItem testGlobalContextItem004;
+    private TestContextDoubleItem testGlobalContextItem005;
+    private TestContextStringItem testGlobalContextItem006;
+    private TestContextLongObjectItem testGlobalContextItem007;
+    private TestContextDateItem testGlobalContextItem008;
+    private TestContextDateTzItem testGlobalContextItem009;
+    private TestContextDateLocaleItem testGlobalContextItem00A;
+    private TestContextTreeSetItem testGlobalContextItem00B;
+    private TestContextTreeMapItem testGlobalContextItem00C;
 
     /**
      * Gets the test global context item 000.
      *
      * @return the test global context item 000
      */
-    public TestContextItem000 getTestGlobalContextItem000() {
+    public TestContextBooleanItem getTestGlobalContextItem000() {
         return testGlobalContextItem000;
     }
 
@@ -58,7 +58,7 @@
      *
      * @param testGlobalContextItem000 the test global context item 000
      */
-    public void setTestGlobalContextItem000(final TestContextItem000 testGlobalContextItem000) {
+    public void setTestGlobalContextItem000(final TestContextBooleanItem testGlobalContextItem000) {
         this.testGlobalContextItem000 = testGlobalContextItem000;
     }
 
@@ -67,7 +67,7 @@
      *
      * @return the test global context item 001
      */
-    public TestContextItem001 getTestGlobalContextItem001() {
+    public TestContextByteItem getTestGlobalContextItem001() {
         return testGlobalContextItem001;
     }
 
@@ -76,7 +76,7 @@
      *
      * @param testGlobalContextItem001 the test global context item 001
      */
-    public void setTestGlobalContextItem001(final TestContextItem001 testGlobalContextItem001) {
+    public void setTestGlobalContextItem001(final TestContextByteItem testGlobalContextItem001) {
         this.testGlobalContextItem001 = testGlobalContextItem001;
     }
 
@@ -85,7 +85,7 @@
      *
      * @return the test global context item 002
      */
-    public TestContextItem002 getTestGlobalContextItem002() {
+    public TestContextIntItem getTestGlobalContextItem002() {
         return testGlobalContextItem002;
     }
 
@@ -94,7 +94,7 @@
      *
      * @param testGlobalContextItem002 the test global context item 002
      */
-    public void setTestGlobalContextItem002(final TestContextItem002 testGlobalContextItem002) {
+    public void setTestGlobalContextItem002(final TestContextIntItem testGlobalContextItem002) {
         this.testGlobalContextItem002 = testGlobalContextItem002;
     }
 
@@ -103,7 +103,7 @@
      *
      * @return the test global context item 003
      */
-    public TestContextItem003 getTestGlobalContextItem003() {
+    public TestContextLongItem getTestGlobalContextItem003() {
         return testGlobalContextItem003;
     }
 
@@ -112,7 +112,7 @@
      *
      * @param testGlobalContextItem003 the test global context item 003
      */
-    public void setTestGlobalContextItem003(final TestContextItem003 testGlobalContextItem003) {
+    public void setTestGlobalContextItem003(final TestContextLongItem testGlobalContextItem003) {
         this.testGlobalContextItem003 = testGlobalContextItem003;
     }
 
@@ -121,7 +121,7 @@
      *
      * @return the test global context item 004
      */
-    public TestContextItem004 getTestGlobalContextItem004() {
+    public TestContextFloatItem getTestGlobalContextItem004() {
         return testGlobalContextItem004;
     }
 
@@ -130,7 +130,7 @@
      *
      * @param testGlobalContextItem004 the test global context item 004
      */
-    public void setTestGlobalContextItem004(final TestContextItem004 testGlobalContextItem004) {
+    public void setTestGlobalContextItem004(final TestContextFloatItem testGlobalContextItem004) {
         this.testGlobalContextItem004 = testGlobalContextItem004;
     }
 
@@ -139,7 +139,7 @@
      *
      * @return the test global context item 005
      */
-    public TestContextItem005 getTestGlobalContextItem005() {
+    public TestContextDoubleItem getTestGlobalContextItem005() {
         return testGlobalContextItem005;
     }
 
@@ -148,7 +148,7 @@
      *
      * @param testGlobalContextItem005 the test global context item 005
      */
-    public void setTestGlobalContextItem005(final TestContextItem005 testGlobalContextItem005) {
+    public void setTestGlobalContextItem005(final TestContextDoubleItem testGlobalContextItem005) {
         this.testGlobalContextItem005 = testGlobalContextItem005;
     }
 
@@ -157,7 +157,7 @@
      *
      * @return the test global context item 006
      */
-    public TestContextItem006 getTestGlobalContextItem006() {
+    public TestContextStringItem getTestGlobalContextItem006() {
         return testGlobalContextItem006;
     }
 
@@ -166,7 +166,7 @@
      *
      * @param testGlobalContextItem006 the test global context item 006
      */
-    public void setTestGlobalContextItem006(final TestContextItem006 testGlobalContextItem006) {
+    public void setTestGlobalContextItem006(final TestContextStringItem testGlobalContextItem006) {
         this.testGlobalContextItem006 = testGlobalContextItem006;
     }
 
@@ -175,7 +175,7 @@
      *
      * @return the test global context item 007
      */
-    public TestContextItem007 getTestGlobalContextItem007() {
+    public TestContextLongObjectItem getTestGlobalContextItem007() {
         return testGlobalContextItem007;
     }
 
@@ -184,7 +184,7 @@
      *
      * @param testGlobalContextItem007 the test global context item 007
      */
-    public void setTestGlobalContextItem007(final TestContextItem007 testGlobalContextItem007) {
+    public void setTestGlobalContextItem007(final TestContextLongObjectItem testGlobalContextItem007) {
         this.testGlobalContextItem007 = testGlobalContextItem007;
     }
 
@@ -193,7 +193,7 @@
      *
      * @return the test global context item 008
      */
-    public TestContextItem008 getTestGlobalContextItem008() {
+    public TestContextDateItem getTestGlobalContextItem008() {
         return testGlobalContextItem008;
     }
 
@@ -202,7 +202,7 @@
      *
      * @param testGlobalContextItem008 the test global context item 008
      */
-    public void setTestGlobalContextItem008(final TestContextItem008 testGlobalContextItem008) {
+    public void setTestGlobalContextItem008(final TestContextDateItem testGlobalContextItem008) {
         this.testGlobalContextItem008 = testGlobalContextItem008;
     }
 
@@ -211,7 +211,7 @@
      *
      * @return the test global context item 009
      */
-    public TestContextItem009 getTestGlobalContextItem009() {
+    public TestContextDateTzItem getTestGlobalContextItem009() {
         return testGlobalContextItem009;
     }
 
@@ -220,7 +220,7 @@
      *
      * @param testGlobalContextItem009 the test global context item 009
      */
-    public void setTestGlobalContextItem009(final TestContextItem009 testGlobalContextItem009) {
+    public void setTestGlobalContextItem009(final TestContextDateTzItem testGlobalContextItem009) {
         this.testGlobalContextItem009 = testGlobalContextItem009;
     }
 
@@ -229,7 +229,7 @@
      *
      * @return the test global context item 00 A
      */
-    public TestContextItem00A getTestGlobalContextItem00A() {
+    public TestContextDateLocaleItem getTestGlobalContextItem00A() {
         return testGlobalContextItem00A;
     }
 
@@ -238,7 +238,7 @@
      *
      * @param testGlobalContextItem00A the test global context item 00 A
      */
-    public void setTestGlobalContextItem00A(final TestContextItem00A testGlobalContextItem00A) {
+    public void setTestGlobalContextItem00A(final TestContextDateLocaleItem testGlobalContextItem00A) {
         this.testGlobalContextItem00A = testGlobalContextItem00A;
     }
 
@@ -247,7 +247,7 @@
      *
      * @return the test global context item 00 B
      */
-    public TestContextItem00B getTestGlobalContextItem00B() {
+    public TestContextTreeSetItem getTestGlobalContextItem00B() {
         return testGlobalContextItem00B;
     }
 
@@ -256,7 +256,7 @@
      *
      * @param testGlobalContextItem00B the test global context item 00 B
      */
-    public void setTestGlobalContextItem00B(final TestContextItem00B testGlobalContextItem00B) {
+    public void setTestGlobalContextItem00B(final TestContextTreeSetItem testGlobalContextItem00B) {
         this.testGlobalContextItem00B = testGlobalContextItem00B;
     }
 
@@ -265,7 +265,7 @@
      *
      * @return the test global context item 00 C
      */
-    public TestContextItem00C getTestGlobalContextItem00C() {
+    public TestContextTreeMapItem getTestGlobalContextItem00C() {
         return testGlobalContextItem00C;
     }
 
@@ -274,7 +274,7 @@
      *
      * @param testGlobalContextItem00C the test global context item 00 C
      */
-    public void setTestGlobalContextItem00C(final TestContextItem00C testGlobalContextItem00C) {
+    public void setTestGlobalContextItem00C(final TestContextTreeMapItem testGlobalContextItem00C) {
         this.testGlobalContextItem00C = testGlobalContextItem00C;
     }
 
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestPolicyContextItem.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestPolicyContextItem.java
similarity index 83%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestPolicyContextItem.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestPolicyContextItem.java
index e9381de..fc728a7 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/TestPolicyContextItem.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestPolicyContextItem.java
@@ -30,19 +30,19 @@
 
     private static final int HASH_PRIME_1 = 31;
 
-    private TestContextItem006 testPolicyContextItem000;
-    private TestContextItem003 testPolicyContextItem001;
-    private TestContextItem005 testPolicyContextItem002;
-    private TestContextItem000 testPolicyContextItem003;
-    private TestContextItem003 testPolicyContextItem004;
-    private TestContextItem00C testPolicyContextItem005;
+    private TestContextStringItem testPolicyContextItem000;
+    private TestContextLongItem testPolicyContextItem001;
+    private TestContextDoubleItem testPolicyContextItem002;
+    private TestContextBooleanItem testPolicyContextItem003;
+    private TestContextLongItem testPolicyContextItem004;
+    private TestContextTreeMapItem testPolicyContextItem005;
 
     /**
      * Gets the test policy context item 000.
      *
      * @return the test policy context item 000
      */
-    public TestContextItem006 getTestPolicyContextItem000() {
+    public TestContextStringItem getTestPolicyContextItem000() {
         return testPolicyContextItem000;
     }
 
@@ -51,7 +51,7 @@
      *
      * @param testPolicyContextItem000 the test policy context item 000
      */
-    public void setTestPolicyContextItem000(final TestContextItem006 testPolicyContextItem000) {
+    public void setTestPolicyContextItem000(final TestContextStringItem testPolicyContextItem000) {
         this.testPolicyContextItem000 = testPolicyContextItem000;
     }
 
@@ -60,7 +60,7 @@
      *
      * @return the test policy context item 001
      */
-    public TestContextItem003 getTestPolicyContextItem001() {
+    public TestContextLongItem getTestPolicyContextItem001() {
         return testPolicyContextItem001;
     }
 
@@ -69,7 +69,7 @@
      *
      * @param testPolicyContextItem001 the test policy context item 001
      */
-    public void setTestPolicyContextItem001(final TestContextItem003 testPolicyContextItem001) {
+    public void setTestPolicyContextItem001(final TestContextLongItem testPolicyContextItem001) {
         this.testPolicyContextItem001 = testPolicyContextItem001;
     }
 
@@ -78,7 +78,7 @@
      *
      * @return the test policy context item 002
      */
-    public TestContextItem005 getTestPolicyContextItem002() {
+    public TestContextDoubleItem getTestPolicyContextItem002() {
         return testPolicyContextItem002;
     }
 
@@ -87,7 +87,7 @@
      *
      * @param testPolicyContextItem002 the test policy context item 002
      */
-    public void setTestPolicyContextItem002(final TestContextItem005 testPolicyContextItem002) {
+    public void setTestPolicyContextItem002(final TestContextDoubleItem testPolicyContextItem002) {
         this.testPolicyContextItem002 = testPolicyContextItem002;
     }
 
@@ -96,7 +96,7 @@
      *
      * @return the test policy context item 003
      */
-    public TestContextItem000 getTestPolicyContextItem003() {
+    public TestContextBooleanItem getTestPolicyContextItem003() {
         return testPolicyContextItem003;
     }
 
@@ -105,7 +105,7 @@
      *
      * @param testPolicyContextItem003 the test policy context item 003
      */
-    public void setTestPolicyContextItem003(final TestContextItem000 testPolicyContextItem003) {
+    public void setTestPolicyContextItem003(final TestContextBooleanItem testPolicyContextItem003) {
         this.testPolicyContextItem003 = testPolicyContextItem003;
     }
 
@@ -114,7 +114,7 @@
      *
      * @return the test policy context item 004
      */
-    public TestContextItem003 getTestPolicyContextItem004() {
+    public TestContextLongItem getTestPolicyContextItem004() {
         return testPolicyContextItem004;
     }
 
@@ -123,7 +123,7 @@
      *
      * @param testPolicyContextItem004 the test policy context item 004
      */
-    public void setTestPolicyContextItem004(final TestContextItem003 testPolicyContextItem004) {
+    public void setTestPolicyContextItem004(final TestContextLongItem testPolicyContextItem004) {
         this.testPolicyContextItem004 = testPolicyContextItem004;
     }
 
@@ -132,7 +132,7 @@
      *
      * @return the test policy context item 005
      */
-    public TestContextItem00C getTestPolicyContextItem005() {
+    public TestContextTreeMapItem getTestPolicyContextItem005() {
         return testPolicyContextItem005;
     }
 
@@ -141,7 +141,7 @@
      *
      * @param testPolicyContextItem005 the test policy context item 005
      */
-    public void setTestPolicyContextItem005(final TestContextItem00C testPolicyContextItem005) {
+    public void setTestPolicyContextItem005(final TestContextTreeMapItem testPolicyContextItem005) {
         this.testPolicyContextItem005 = testPolicyContextItem005;
     }
 
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/package-info.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/package-info.java
similarity index 100%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/concepts/package-info.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/package-info.java
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/ContextAlbumUpdate.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextAlbumUpdate.java
similarity index 73%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/ContextAlbumUpdate.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextAlbumUpdate.java
index ae0fea7..189208f 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/ContextAlbumUpdate.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextAlbumUpdate.java
@@ -20,6 +20,11 @@
 
 package org.onap.policy.apex.context.test.distribution;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.onap.policy.apex.context.test.utils.Constants.APEX_DISTRIBUTOR;
+import static org.onap.policy.apex.context.test.utils.Constants.VERSION;
+
 import java.io.IOException;
 
 import org.onap.policy.apex.context.ContextAlbum;
@@ -40,7 +45,6 @@
  * The Class ContextAlbumUpdate is used to test Context Album updates.
  */
 public class ContextAlbumUpdate {
-    // Logger for this class
     private static final XLogger LOGGER = XLoggerFactory.getXLogger(ContextAlbumUpdate.class);
 
     /**
@@ -53,21 +57,22 @@
     public void testContextAlbumUpdate() throws ApexModelException, IOException, ApexException {
         LOGGER.debug("Running TestContextAlbumUpdate test . . .");
 
-        final AxArtifactKey distributorKey = new AxArtifactKey("ApexDistributor", "0.0.1");
+        final AxArtifactKey distributorKey = new AxArtifactKey(APEX_DISTRIBUTOR, VERSION);
         final Distributor contextDistributor = new DistributorFactory().getDistributor(distributorKey);
 
         final AxContextModel longModel = TestContextAlbumFactory.createLongContextModel();
         contextDistributor.registerModel(longModel);
 
-        final AxContextAlbum longAlbum1Def = longModel.getAlbums().get(new AxArtifactKey("LongContextAlbum1", "0.0.1"));
+        final AxContextAlbum longAlbum1Def = longModel.getAlbums().get(new AxArtifactKey("LongContextAlbum1", VERSION));
         final ContextAlbum longAlbum1 = contextDistributor.createContextAlbum(longAlbum1Def.getKey());
-        assert (longAlbum1 != null);
 
-        final AxContextAlbum longAlbum2Def = longModel.getAlbums().get(new AxArtifactKey("LongContextAlbum2", "0.0.1"));
+        assertNotNull(longAlbum1);
+
+        final AxContextAlbum longAlbum2Def = longModel.getAlbums().get(new AxArtifactKey("LongContextAlbum2", VERSION));
         final ContextAlbum longAlbum2 = contextDistributor.createContextAlbum(longAlbum2Def.getKey());
-        assert (longAlbum2 != null);
 
-        // CHECKSTYLE:OFF: checkstyle:magicNumber
+        assertNotNull(longAlbum2);
+
         longAlbum1.put("0", (long) 0);
         longAlbum1.put("1", (long) 1);
         longAlbum1.put("2", (long) 2);
@@ -76,20 +81,21 @@
         final KeyedMapDifference<String, Object> result0 =
                 new KeyedMapComparer<String, Object>().compareMaps(longAlbum1, longAlbum2);
 
-        assert (0 == result0.getDifferentValues().size());
-        assert (0 == result0.getIdenticalValues().size());
-        assert (0 == result0.getRightOnly().size());
-        assert (4 == result0.getLeftOnly().size());
+        assertEquals(0, result0.getDifferentValues().size());
+        assertEquals(0, result0.getIdenticalValues().size());
+        assertEquals(0, result0.getRightOnly().size());
+        assertEquals(4, result0.getLeftOnly().size());
 
         longAlbum2.putAll(longAlbum1);
 
         final KeyedMapDifference<String, Object> result1 =
                 new KeyedMapComparer<String, Object>().compareMaps(longAlbum1, longAlbum2);
 
-        assert (0 == result1.getDifferentValues().size());
-        assert (4 == result1.getIdenticalValues().size());
-        assert (0 == result1.getRightOnly().size());
-        assert (0 == result1.getLeftOnly().size());
+
+        assertEquals(0, result1.getDifferentValues().size());
+        assertEquals(4, result1.getIdenticalValues().size());
+        assertEquals(0, result1.getRightOnly().size());
+        assertEquals(0, result1.getLeftOnly().size());
 
         longAlbum1.put("4", (long) 4);
         longAlbum2.put("5", (long) 5);
@@ -99,23 +105,21 @@
         final KeyedMapDifference<String, Object> result2 =
                 new KeyedMapComparer<String, Object>().compareMaps(longAlbum1, longAlbum2);
 
-        assert (1 == result2.getDifferentValues().size());
-        assert (4 == result2.getIdenticalValues().size());
-        assert (1 == result2.getRightOnly().size());
-        assert (1 == result2.getLeftOnly().size());
+        assertEquals(1, result2.getDifferentValues().size());
+        assertEquals(4, result2.getIdenticalValues().size());
+        assertEquals(1, result2.getRightOnly().size());
+        assertEquals(1, result2.getLeftOnly().size());
 
         longAlbum1.remove("0");
         longAlbum2.remove("3");
-        // CHECKSTYLE:ON: checkstyle:magicNumber
 
         final KeyedMapDifference<String, Object> result3 =
                 new KeyedMapComparer<String, Object>().compareMaps(longAlbum1, longAlbum2);
 
-        assert (1 == result3.getDifferentValues().size());
-        assert (2 == result3.getIdenticalValues().size());
-        assert (2 == result3.getRightOnly().size());
-        assert (2 == result3.getLeftOnly().size());
-
+        assertEquals(1, result3.getDifferentValues().size());
+        assertEquals(2, result3.getIdenticalValues().size());
+        assertEquals(2, result3.getRightOnly().size());
+        assertEquals(2, result3.getLeftOnly().size());
         contextDistributor.clear();
     }
 }
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextInstantiation.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextInstantiation.java
new file mode 100644
index 0000000..03ef650
--- /dev/null
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextInstantiation.java
@@ -0,0 +1,552 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.context.test.distribution;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.onap.policy.apex.context.test.factory.TestContextAlbumFactory.createPolicyContextModel;
+import static org.onap.policy.apex.context.test.utils.Constants.BYTE_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.EXCEPTION_MESSAGE;
+import static org.onap.policy.apex.context.test.utils.Constants.EXTERNAL_CONTEXT;
+import static org.onap.policy.apex.context.test.utils.Constants.EXTERNAL_CONTEXT_ALBUM;
+import static org.onap.policy.apex.context.test.utils.Constants.FLOAT_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.GLOBAL_CONTEXT_ALBUM;
+import static org.onap.policy.apex.context.test.utils.Constants.GLOBAL_CONTEXT_KEY;
+import static org.onap.policy.apex.context.test.utils.Constants.INT_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.INT_VAL_2;
+import static org.onap.policy.apex.context.test.utils.Constants.INT_VAL_3;
+import static org.onap.policy.apex.context.test.utils.Constants.LONG_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.PI_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.POLICY_CONTEXT_ALBUM;
+import static org.onap.policy.apex.context.test.utils.Constants.STRING_EXT_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.STRING_GLOBAL_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.STRING_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.TEST_POLICY_CONTEXT_ITEM;
+import static org.onap.policy.apex.context.test.utils.Constants.TIME_ZONE;
+import static org.onap.policy.apex.context.test.utils.Constants.USED_ARTIFACT_STACK_ARRAY;
+import static org.onap.policy.apex.context.test.utils.Constants.VERSION;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.onap.policy.apex.context.ContextAlbum;
+import org.onap.policy.apex.context.ContextException;
+import org.onap.policy.apex.context.ContextRuntimeException;
+import org.onap.policy.apex.context.Distributor;
+import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
+import org.onap.policy.apex.context.test.concepts.TestContextBooleanItem;
+import org.onap.policy.apex.context.test.concepts.TestContextByteItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateTzItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDoubleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextFloatItem;
+import org.onap.policy.apex.context.test.concepts.TestContextIntItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongObjectItem;
+import org.onap.policy.apex.context.test.concepts.TestContextStringItem;
+import org.onap.policy.apex.context.test.concepts.TestContextTreeMapItem;
+import org.onap.policy.apex.context.test.concepts.TestContextTreeSetItem;
+import org.onap.policy.apex.context.test.concepts.TestExternalContextItem;
+import org.onap.policy.apex.context.test.concepts.TestGlobalContextItem;
+import org.onap.policy.apex.context.test.concepts.TestPolicyContextItem;
+import org.onap.policy.apex.context.test.factory.TestContextAlbumFactory;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
+/**
+ * The Class TestContextInstantiation is used to test Apex context insitiation is correct.
+ *
+ * @author Sergey Sachkov (sergey.sachkov@ericsson.com)
+ */
+public class ContextInstantiation {
+
+    // Logger for this class
+    private static final XLogger LOGGER = XLoggerFactory.getXLogger(ContextInstantiation.class);
+
+    private final static TreeSet<String> TEST_TREE_SET = new TreeSet<>();
+    private final static Map<String, String> TEST_HASH_MAP = new HashMap<>();
+
+    static {
+        TEST_TREE_SET.add("one hundred");
+        TEST_TREE_SET.add("one hundred and one");
+        TEST_TREE_SET.add("one hundred and two");
+        TEST_TREE_SET.add("one hundred and three");
+        TEST_TREE_SET.add("one hundred and four");
+
+        TEST_HASH_MAP.put("0", "zero");
+        TEST_HASH_MAP.put("1", "one");
+        TEST_HASH_MAP.put("2", "two");
+        TEST_HASH_MAP.put("3", "three");
+        TEST_HASH_MAP.put("4", "four");
+
+    }
+
+    /**
+     * Test context instantiation.
+     *
+     * @throws ContextException the context exception
+     */
+    public void testContextInstantiation() throws ContextException {
+        LOGGER.debug("Running TestContextInstantiation test . . .");
+
+        final Distributor contextDistributor = getDistributor();
+
+        try {
+
+            final ContextAlbum policyContextAlbum =
+                    contextDistributor.createContextAlbum(new AxArtifactKey(POLICY_CONTEXT_ALBUM, VERSION));
+
+            assertNotNull(policyContextAlbum);
+            policyContextAlbum.setUserArtifactStack(USED_ARTIFACT_STACK_ARRAY);
+
+            final Date testDate = new Date();
+
+            final TestContextDateTzItem tci9 = getTestContextDateTzItem(testDate);
+            final TestContextDateLocaleItem tciA = getTestContextDateLocaleItem(testDate);
+
+            final TestPolicyContextItem policyContext = getTestPolicyContextItem(policyContextAlbum, testDate);
+
+            final Map<String, Object> valueMap0 = new HashMap<>();
+            valueMap0.put(TEST_POLICY_CONTEXT_ITEM, policyContext);
+
+            policyContextAlbum.putAll(valueMap0);
+
+            final TestPolicyContextItem contextItem =
+                    (TestPolicyContextItem) policyContextAlbum.get(TEST_POLICY_CONTEXT_ITEM);
+            assertEquals(STRING_VAL, contextItem.getTestPolicyContextItem000().getStringValue());
+
+            assertEquals(LONG_VAL, contextItem.getTestPolicyContextItem001().getLongValue());
+            assertDouble(contextItem.getTestPolicyContextItem002().getDoubleValue(), PI_VAL);
+            assertTrue(contextItem.getTestPolicyContextItem003().getFlag());
+            assertEquals(contextItem.getTestPolicyContextItem004().getLongValue(), testDate.getTime());
+            assertEquals(contextItem.getTestPolicyContextItem005().getMapValue(), TEST_HASH_MAP);
+
+            final TestGlobalContextItem globalContext =
+                    getTestGlobalContextItem(contextDistributor, testDate, tci9, tciA);
+
+            final Map<String, Object> valueMap1 = new HashMap<>();
+            valueMap1.put(GLOBAL_CONTEXT_KEY, globalContext);
+
+            final ContextAlbum globalContextAlbum = getContextAlbum(contextDistributor);
+
+            globalContextAlbum.putAll(valueMap1);
+
+            final TestGlobalContextItem globalContextItem =
+                    (TestGlobalContextItem) globalContextAlbum.get(GLOBAL_CONTEXT_KEY);
+
+            assertFalse(globalContextItem.getTestGlobalContextItem000().getFlag());
+
+            assertEquals(BYTE_VAL, globalContextItem.getTestGlobalContextItem001().getByteValue());
+
+            assertEquals(INT_VAL, globalContextItem.getTestGlobalContextItem002().getIntValue());
+            assertEquals(LONG_VAL, globalContextItem.getTestGlobalContextItem003().getLongValue());
+            assertFloat(FLOAT_VAL, globalContextItem.getTestGlobalContextItem004().getFloatValue());
+
+            assertDouble(PI_VAL, globalContextItem.getTestGlobalContextItem005().getDoubleValue());
+            assertEquals(STRING_GLOBAL_VAL, globalContextItem.getTestGlobalContextItem006().getStringValue());
+
+            assertEquals(new Long(testDate.getTime()), globalContextItem.getTestGlobalContextItem007().getLongValue());
+            assertEquals(testDate, globalContextItem.getTestGlobalContextItem008().getDateValue());
+            assertEquals(tci9.getDateValue().getTime(),
+                    globalContextItem.getTestGlobalContextItem009().getDateValue().getTime());
+
+            assertEquals(tciA.getDateValue().getTime(),
+                    globalContextItem.getTestGlobalContextItem00A().getDateValue().getTime());
+
+            assertEquals(TEST_TREE_SET, globalContextItem.getTestGlobalContextItem00B().getSetValue());
+            assertEquals(TEST_HASH_MAP, globalContextItem.getTestGlobalContextItem00C().getMapValue());
+
+            final AxContextModel externalContextModel = TestContextAlbumFactory.createExternalContextModel();
+
+            final TestContextDateTzItem tci9A = new TestContextDateTzItem(tci9);
+            final TestContextDateLocaleItem tciAA = new TestContextDateLocaleItem(tciA);
+            final TestExternalContextItem externalContext = getTestExternalContextItem(testDate, tci9A, tciAA);
+
+            final Map<String, Object> valueMap2 = new HashMap<>();
+            valueMap2.put(EXTERNAL_CONTEXT, externalContext);
+
+            contextDistributor.clear();
+            contextDistributor.init(new AxArtifactKey("ClearedandInittedDistributor", VERSION));
+            contextDistributor.registerModel(externalContextModel);
+
+            final AxArtifactKey axContextAlbumKey = new AxArtifactKey(EXTERNAL_CONTEXT_ALBUM, VERSION);
+            final ContextAlbum externalContextAlbum = contextDistributor.createContextAlbum(axContextAlbumKey);
+            assertNotNull(externalContextAlbum);
+            externalContextAlbum.setUserArtifactStack(USED_ARTIFACT_STACK_ARRAY);
+
+            externalContextAlbum.putAll(valueMap2);
+            externalContextAlbum.getAlbumDefinition().setWritable(false);
+
+            TestExternalContextItem externalContextItem =
+                    (TestExternalContextItem) externalContextAlbum.get(EXTERNAL_CONTEXT);
+
+            assertFalse(externalContextItem.getTestExternalContextItem000().getFlag());
+            assertEquals(BYTE_VAL, externalContextItem.getTestExternalContextItem001().getByteValue());
+            assertEquals(INT_VAL, externalContextItem.getTestExternalContextItem002().getIntValue());
+
+            assertFloat(LONG_VAL, externalContextItem.getTestExternalContextItem003().getLongValue());
+            assertFloat(FLOAT_VAL, externalContextItem.getTestExternalContextItem004().getFloatValue());
+
+            assertDouble(PI_VAL, externalContextItem.getTestExternalContextItem005().getDoubleValue());
+            assertEquals(STRING_EXT_VAL, externalContextItem.getTestExternalContextItem006().getStringValue());
+            assertEquals(new Long(testDate.getTime()),
+                    externalContextItem.getTestExternalContextItem007().getLongValue());
+            assertEquals(testDate, externalContextItem.getTestExternalContextItem008().getDateValue());
+            assertEquals(tci9A.getDateValue().getTime(),
+                    externalContextItem.getTestExternalContextItem009().getDateValue().getTime());
+
+            assertEquals(tciAA.getDateValue().getTime(),
+                    externalContextItem.getTestExternalContextItem00A().getDateValue().getTime());
+            assertEquals(TEST_TREE_SET, externalContextItem.getTestExternalContextItem00B().getSetValue());
+            assertEquals(TEST_HASH_MAP, externalContextItem.getTestExternalContextItem00C().getMapValue());
+
+            final Collection<Object> mapValues = externalContextAlbum.values();
+            assertTrue(externalContextAlbum.values().containsAll(mapValues));
+
+            // Check that clearing does not work
+            try {
+                externalContextAlbum.clear();
+                fail(EXCEPTION_MESSAGE);
+            } catch (final ContextRuntimeException e) {
+                assertEquals("album \"ExternalContextAlbum:0.0.1\" clear() not allowed on read only albums",
+                        e.getMessage());
+            }
+
+            assertEquals(1, externalContextAlbum.size());
+
+            assertContextAlbumContains(externalContext, externalContextAlbum);
+
+            final Set<Entry<String, Object>> entrySet = externalContextAlbum.entrySet();
+            assertEquals(1, entrySet.size());
+
+            try {
+                externalContextAlbum.get(null);
+            } catch (final ContextRuntimeException e) {
+                assertEquals("album \"ExternalContextAlbum:0.0.1\" null keys are illegal on keys for get()",
+                        e.getMessage());
+
+            }
+
+            final Object aObject = externalContextAlbum.get(EXTERNAL_CONTEXT);
+            assertEquals(aObject, externalContext);
+
+            // put null keys should fail, throws a runtime exception
+            try {
+                externalContextAlbum.put(null, null);
+            } catch (final ContextRuntimeException e) {
+                assertEquals("album \"ExternalContextAlbum:0.0.1\" null keys are illegal on keys for put()",
+                        e.getMessage());
+            }
+
+            try {
+                externalContextAlbum.put("TestExternalContextItem00A", null);
+            } catch (final ContextRuntimeException e) {
+                assertEquals(
+                        "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItem00A\" for put()",
+                        e.getMessage());
+            }
+            assertEquals(tciAA, externalContextItem.getTestExternalContextItem00A());
+
+            // Should return the hash set
+            assertEquals(TEST_TREE_SET, externalContextItem.getTestExternalContextItem00B().getSetValue());
+
+            assertTrue(externalContextAlbum.values().containsAll(mapValues));
+
+            // Set the write flag back as it should be
+            externalContextAlbum.getAlbumDefinition().setWritable(true);
+
+            // Put should return the previous contextItem
+            final TestExternalContextItem externalContextOther = new TestExternalContextItem();
+            externalContextOther.setTestExternalContextItem002(new TestContextIntItem());
+            externalContextOther.getTestExternalContextItem002().setIntValue(INT_VAL_2);
+
+            assertTrue(externalContextAlbum.put(EXTERNAL_CONTEXT, externalContextOther).equals(externalContext));
+            externalContextItem = (TestExternalContextItem) externalContextAlbum.get(EXTERNAL_CONTEXT);
+            assertEquals(INT_VAL_2, externalContextItem.getTestExternalContextItem002().getIntValue());
+            assertTrue(externalContextAlbum.put(EXTERNAL_CONTEXT, externalContext).equals(externalContextOther));
+            externalContextItem = (TestExternalContextItem) externalContextAlbum.get(EXTERNAL_CONTEXT);
+            assertEquals(INT_VAL_3, externalContextItem.getTestExternalContextItem002().getIntValue());
+
+            try {
+                externalContextAlbum.put("TestExternalContextItem00A", null);
+            } catch (final ContextRuntimeException e) {
+                assert (e.getMessage().equals(
+                        "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItem00A\" for put()"));
+            }
+            assertTrue(externalContextAlbum.get(EXTERNAL_CONTEXT).equals(externalContext));
+
+            try {
+                externalContextAlbum.put("TestExternalContextItemFFF", null);
+            } catch (final ContextRuntimeException e) {
+                assert (e.getMessage().equals(
+                        "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItemFFF\" for put()"));
+            }
+            assertEquals(1, externalContextAlbum.size());
+
+            try {
+                externalContextAlbum.put("TestExternalContextItemFFF", null);
+            } catch (final ContextRuntimeException e) {
+                assertEquals(
+                        "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItemFFF\" for put()",
+                        e.getMessage());
+            }
+            assertEquals(1, externalContextAlbum.size());
+
+            // Should ignore remove
+            externalContextAlbum.remove("TestExternalContextItem017");
+            assertEquals(1, externalContextAlbum.size());
+            assertEquals(1, externalContextAlbum.values().size());
+            assertTrue(externalContextAlbum.values().containsAll(mapValues));
+        } catch (final Exception exception) {
+            LOGGER.error("Unexpected Error:", exception);
+            throw exception;
+        } finally {
+            contextDistributor.clear();
+        }
+
+    }
+
+    private void assertContextAlbumContains(final TestExternalContextItem externalContext,
+            final ContextAlbum externalContextAlbum) {
+        try {
+            externalContextAlbum.containsKey(null);
+        } catch (final ContextRuntimeException e) {
+            assertEquals("null values are illegal on method parameter \"key\"", e.getMessage());
+        }
+
+        assertTrue(externalContextAlbum.containsKey(EXTERNAL_CONTEXT));
+        assertTrue(!externalContextAlbum.containsKey(GLOBAL_CONTEXT_KEY));
+
+        try {
+            externalContextAlbum.containsValue(null);
+        } catch (final ContextRuntimeException e) {
+            assertEquals("null values are illegal on method parameter \"value\"", e.getMessage());
+        }
+
+        assertTrue(externalContextAlbum.containsValue(externalContext));
+        assertFalse(externalContextAlbum.containsValue("Hello"));
+    }
+
+    private ContextAlbum getContextAlbum(final Distributor contextDistributor) throws ContextException {
+        final ContextAlbum globalContextAlbum =
+                contextDistributor.createContextAlbum(new AxArtifactKey(GLOBAL_CONTEXT_ALBUM, VERSION));
+        assertNotNull(globalContextAlbum);
+        globalContextAlbum.setUserArtifactStack(USED_ARTIFACT_STACK_ARRAY);
+        return globalContextAlbum;
+    }
+
+    private TestGlobalContextItem getTestGlobalContextItem(final Distributor contextDistributor, final Date testDate,
+            final TestContextDateTzItem tci9, final TestContextDateLocaleItem tciA) throws ContextException {
+        final AxContextModel globalContextModel = TestContextAlbumFactory.createGlobalContextModel();
+        final TestGlobalContextItem globalContext = getTestGlobalContextItem(testDate, tci9, tciA);
+        contextDistributor.registerModel(globalContextModel);
+        return globalContext;
+    }
+
+    private TestPolicyContextItem getTestPolicyContextItem(final ContextAlbum policyContextAlbum, final Date testDate) {
+        final TestContextStringItem contextStringItem = new TestContextStringItem(STRING_VAL);
+        final TestContextLongItem contextLongItem = new TestContextLongItem(LONG_VAL);
+        final TestContextDoubleItem contextDoubleItem = new TestContextDoubleItem(PI_VAL);
+        final TestContextBooleanItem contextBooleanItem = new TestContextBooleanItem(true);
+        final TestContextLongItem contextLongItem2 = new TestContextLongItem(testDate.getTime());
+        final TestContextTreeMapItem contextTreeMapItem = new TestContextTreeMapItem(TEST_HASH_MAP);
+
+        final Map<String, Object> valueMapA = new LinkedHashMap<>();
+        valueMapA.put("TestPolicyContextItem001", contextLongItem);
+        valueMapA.put("TestPolicyContextItem002", contextDoubleItem);
+        valueMapA.put("TestPolicyContextItem003", contextBooleanItem);
+        valueMapA.put("TestPolicyContextItem004", contextLongItem2);
+        valueMapA.put("TestPolicyContextItem005", contextTreeMapItem);
+        valueMapA.put("TestPolicyContextItem000", contextStringItem);
+
+        assertPutMethods(policyContextAlbum, contextStringItem, valueMapA);
+
+        final TestPolicyContextItem policyContext = new TestPolicyContextItem();
+
+        LOGGER.debug(policyContextAlbum.toString());
+
+        policyContext.setTestPolicyContextItem000(contextStringItem);
+        policyContext.setTestPolicyContextItem001(contextLongItem);
+        policyContext.setTestPolicyContextItem002(contextDoubleItem);
+        policyContext.setTestPolicyContextItem003(contextBooleanItem);
+        policyContext.setTestPolicyContextItem004(contextLongItem2);
+        policyContext.setTestPolicyContextItem005(contextTreeMapItem);
+        return policyContext;
+    }
+
+    private void assertPutMethods(final ContextAlbum policyContextAlbum, final TestContextStringItem contextStringItem,
+            final Map<String, Object> valueMapA) {
+        try {
+            policyContextAlbum.put("TestPolicyContextItem000", contextStringItem);
+            fail(EXCEPTION_MESSAGE);
+        } catch (final ContextRuntimeException e) {
+            assertEquals(
+                    getMessage("TestPolicyContextItem000", "TestContextItem006",
+                            TestContextStringItem.class.getCanonicalName(), "stringValue=" + STRING_VAL),
+                    e.getMessage());
+        }
+
+        try {
+            policyContextAlbum.putAll(valueMapA);
+            fail(EXCEPTION_MESSAGE);
+        } catch (final ContextRuntimeException e) {
+            assertEquals(getMessage("TestPolicyContextItem001", "TestContextItem003",
+                    TestContextLongItem.class.getCanonicalName(), "longValue=" + INT_VAL_3), e.getMessage());
+        }
+    }
+
+    private AxContextModel getAxContextModel() {
+        final AxContextModel policyContextModel = createPolicyContextModel();
+        final AxValidationResult result = new AxValidationResult();
+        policyContextModel.validate(result);
+        LOGGER.debug(result.toString());
+
+        assertTrue(result.isValid());
+        return policyContextModel;
+    }
+
+    private TestContextDateLocaleItem getTestContextDateLocaleItem(final Date testDate) {
+        final TestContextDateLocaleItem tciA = new TestContextDateLocaleItem();
+        tciA.setDateValue(new TestContextDateItem(testDate));
+        tciA.setTZValue(TIME_ZONE.getDisplayName());
+        tciA.setDST(true);
+        tciA.setUTCOffset(-600);
+        tciA.setLocale(Locale.ENGLISH);
+        return tciA;
+    }
+
+    private TestContextDateTzItem getTestContextDateTzItem(final Date testDate) {
+        final TestContextDateTzItem tci9 = new TestContextDateTzItem();
+        tci9.setDateValue(new TestContextDateItem(testDate));
+        tci9.setTZValue(TIME_ZONE.getDisplayName());
+        tci9.setDST(true);
+        return tci9;
+    }
+
+    private TestGlobalContextItem getTestGlobalContextItem(final Date testDate, final TestContextDateTzItem tci9,
+            final TestContextDateLocaleItem tciA) {
+        final TestGlobalContextItem globalContext = new TestGlobalContextItem();
+
+        final TestContextBooleanItem testGlobalContextItem000 = new TestContextBooleanItem(false);
+        final TestContextByteItem testGlobalContextItem001 = new TestContextByteItem(BYTE_VAL);
+        final TestContextIntItem testGlobalContextItem002 = new TestContextIntItem(INT_VAL);
+        final TestContextLongItem testGlobalContextItem003 = new TestContextLongItem(LONG_VAL);
+        final TestContextFloatItem testGlobalContextItem004 = new TestContextFloatItem(new Float(FLOAT_VAL));
+        final TestContextDoubleItem testGlobalContextItem005 = new TestContextDoubleItem(PI_VAL);
+        final TestContextStringItem testGlobalContextItem006 = new TestContextStringItem(STRING_GLOBAL_VAL);
+        final TestContextLongObjectItem testGlobalContextItem007 = new TestContextLongObjectItem(testDate.getTime());
+
+        final TestContextDateItem testGlobalContextItem008 = new TestContextDateItem(testDate);
+        final TestContextTreeSetItem testGlobalContextItem00B = new TestContextTreeSetItem(TEST_TREE_SET);
+        final TestContextTreeMapItem testGlobalContextItem00C = new TestContextTreeMapItem(TEST_HASH_MAP);
+
+
+        globalContext.setTestGlobalContextItem000(testGlobalContextItem000);
+        globalContext.setTestGlobalContextItem001(testGlobalContextItem001);
+        globalContext.setTestGlobalContextItem002(testGlobalContextItem002);
+        globalContext.setTestGlobalContextItem003(testGlobalContextItem003);
+        globalContext.setTestGlobalContextItem004(testGlobalContextItem004);
+        globalContext.setTestGlobalContextItem005(testGlobalContextItem005);
+        globalContext.setTestGlobalContextItem006(testGlobalContextItem006);
+        globalContext.setTestGlobalContextItem007(testGlobalContextItem007);
+        globalContext.setTestGlobalContextItem008(testGlobalContextItem008);
+        globalContext.setTestGlobalContextItem009(tci9);
+        globalContext.setTestGlobalContextItem00A(tciA);
+        globalContext.setTestGlobalContextItem00B(testGlobalContextItem00B);
+        globalContext.setTestGlobalContextItem00C(testGlobalContextItem00C);
+        return globalContext;
+    }
+
+    private TestExternalContextItem getTestExternalContextItem(final Date testDate, final TestContextDateTzItem tci9A,
+            final TestContextDateLocaleItem tciAA) {
+        final TestExternalContextItem externalContext = new TestExternalContextItem();
+
+        final TestContextBooleanItem testExternalContextItem000 = new TestContextBooleanItem(false);
+        final TestContextByteItem testExternalContextItem001 = new TestContextByteItem(BYTE_VAL);
+        final TestContextIntItem testExternalContextItem002 = new TestContextIntItem(INT_VAL);
+        final TestContextLongItem testExternalContextItem003 = new TestContextLongItem(LONG_VAL);
+        final TestContextFloatItem testExternalContextItem004 = new TestContextFloatItem(new Float(3.14159265359));
+        final TestContextDoubleItem testExternalContextItem005 = new TestContextDoubleItem(PI_VAL);
+        final TestContextStringItem testExternalContextItem006 = new TestContextStringItem(STRING_EXT_VAL);
+        final TestContextLongObjectItem testExternalContextItem007 = new TestContextLongObjectItem(testDate.getTime());
+        final TestContextDateItem testExternalContextItem008 = new TestContextDateItem(testDate);
+        final TestContextTreeSetItem testExternalContextItem00B = new TestContextTreeSetItem(TEST_TREE_SET);
+        final TestContextTreeMapItem testExternalContextItem00C = new TestContextTreeMapItem(TEST_HASH_MAP);
+
+
+        externalContext.setTestExternalContextItem000(testExternalContextItem000);
+        externalContext.setTestExternalContextItem001(testExternalContextItem001);
+        externalContext.setTestExternalContextItem002(testExternalContextItem002);
+        externalContext.setTestExternalContextItem003(testExternalContextItem003);
+        externalContext.setTestExternalContextItem004(testExternalContextItem004);
+        externalContext.setTestExternalContextItem005(testExternalContextItem005);
+        externalContext.setTestExternalContextItem006(testExternalContextItem006);
+        externalContext.setTestExternalContextItem007(testExternalContextItem007);
+        externalContext.setTestExternalContextItem008(testExternalContextItem008);
+        externalContext.setTestExternalContextItem009(tci9A);
+        externalContext.setTestExternalContextItem00A(tciAA);
+        externalContext.setTestExternalContextItem00B(testExternalContextItem00B);
+        externalContext.setTestExternalContextItem00C(testExternalContextItem00C);
+        return externalContext;
+    }
+
+    private String getMessage(final String key, final String objName, final String clazzName, final String valString) {
+        return getMessage(key, objName, clazzName, valString, TestPolicyContextItem.class.getCanonicalName());
+    }
+
+    private String getMessage(final String key, final String objName, final String clazzName, final String valString,
+            final String compatibleClazzName) {
+        return "Failed to set context value for key \"" + key + "\" in album \"PolicyContextAlbum:0.0.1\": "
+                + "PolicyContextAlbum:0.0.1: object \"" + objName + " [" + valString + "]\" " + "of class \""
+                + clazzName + "\"" + " not compatible with class \"" + compatibleClazzName + "\"";
+    }
+
+    private void assertFloat(final float actual, final float expected) {
+        assertTrue(Float.compare(actual, expected) == 0);
+    }
+
+    private void assertDouble(final double actual, final double expected) {
+        assertTrue(Double.compare(actual, expected) == 0);
+    }
+
+
+    private Distributor getDistributor() throws ContextException {
+        final AxArtifactKey distributorKey = new AxArtifactKey("ApexDistributorInit", VERSION);
+        final Distributor distributor = new DistributorFactory().getDistributor(distributorKey);
+        final AxContextModel policyContextModel = getAxContextModel();
+        distributor.registerModel(policyContextModel);
+        return distributor;
+    }
+}
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextUpdate.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextUpdate.java
new file mode 100644
index 0000000..75d5597
--- /dev/null
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/ContextUpdate.java
@@ -0,0 +1,176 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.context.test.distribution;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.onap.policy.apex.context.test.utils.Constants.APEX_DISTRIBUTOR;
+import static org.onap.policy.apex.context.test.utils.Constants.DATE_CONTEXT_ALBUM;
+import static org.onap.policy.apex.context.test.utils.Constants.EXCEPTION_MESSAGE;
+import static org.onap.policy.apex.context.test.utils.Constants.LONG_CONTEXT_ALBUM;
+import static org.onap.policy.apex.context.test.utils.Constants.MAP_CONTEXT_ALBUM;
+import static org.onap.policy.apex.context.test.utils.Constants.TIME_ZONE;
+import static org.onap.policy.apex.context.test.utils.Constants.USED_ARTIFACT_STACK_ARRAY;
+import static org.onap.policy.apex.context.test.utils.Constants.VERSION;
+
+import java.io.IOException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import org.onap.policy.apex.context.ContextAlbum;
+import org.onap.policy.apex.context.ContextException;
+import org.onap.policy.apex.context.ContextRuntimeException;
+import org.onap.policy.apex.context.Distributor;
+import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
+import org.onap.policy.apex.context.test.concepts.TestContextDateItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextTreeMapItem;
+import org.onap.policy.apex.context.test.factory.TestContextAlbumFactory;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
+/**
+ * The Class TestContextUpdate checks context updates.
+ *
+ * @author Sergey Sachkov (sergey.sachkov@ericsson.com)
+ */
+public class ContextUpdate {
+    private static final String ZERO = "zero";
+    private static final String _0 = "0";
+    // Logger for this class
+    private static final XLogger LOGGER = XLoggerFactory.getXLogger(ContextUpdate.class);
+
+    /**
+     * Test context update.
+     *
+     * @throws ApexModelException the apex model exception
+     * @throws IOException the IO exception
+     * @throws ApexException the apex exception
+     */
+    public void testContextUpdate() throws ApexModelException, IOException, ApexException {
+        LOGGER.debug("Running TestContextUpdate test . . .");
+
+        final Distributor contextDistributor = getDistributor();
+
+        final ContextAlbum longContextAlbum = getContextAlbum(LONG_CONTEXT_ALBUM, contextDistributor);
+        final ContextAlbum dateContextAlbum = getContextAlbum(DATE_CONTEXT_ALBUM, contextDistributor);
+        final ContextAlbum mapContextAlbum = getContextAlbum(MAP_CONTEXT_ALBUM, contextDistributor);
+
+        final TestContextDateLocaleItem tciA = getTestContextDateLocaleItem();
+        final TestContextTreeMapItem tciC = getTestContextTreeMapItem();
+
+        longContextAlbum.put(_0, (long) 0);
+        longContextAlbum.put(_0, 0);
+        longContextAlbum.put(_0, _0);
+
+        try {
+            longContextAlbum.put(_0, ZERO);
+            fail(EXCEPTION_MESSAGE);
+        } catch (final ContextRuntimeException e) {
+            assertEquals(
+                    "Failed to set context value for key \"0\" in album \"LongContextAlbum:0.0.1\": LongContextAlbum:0.0.1: object \"zero\" of class \"java.lang.String\" not compatible with class \"java.lang.Long\"",
+                    e.getMessage());
+        }
+
+        try {
+            longContextAlbum.put(_0, "");
+            fail(EXCEPTION_MESSAGE);
+        } catch (final ContextRuntimeException e) {
+            assertEquals(
+                    "Failed to set context value for key \"0\" in album \"LongContextAlbum:0.0.1\": LongContextAlbum:0.0.1: object \"\" of class \"java.lang.String\" not compatible with class \"java.lang.Long\"",
+                    e.getMessage());
+        }
+
+        try {
+            longContextAlbum.put(_0, null);
+            fail(EXCEPTION_MESSAGE);
+        } catch (final ContextRuntimeException e) {
+            assertEquals("album \"LongContextAlbum:0.0.1\" null values are illegal on key \"0\" for put()",
+                    e.getMessage());
+        }
+
+        try {
+            longContextAlbum.put(null, null);
+            fail(EXCEPTION_MESSAGE);
+        } catch (final ContextRuntimeException e) {
+            assertEquals("album \"LongContextAlbum:0.0.1\" null keys are illegal on keys for put()", e.getMessage());
+        }
+
+        assertNull(dateContextAlbum.put("date0", tciA));
+        assertTrue(dateContextAlbum.put("date0", tciA).equals(tciA));
+
+
+        assertNull(mapContextAlbum.put("map0", tciC));
+        assertTrue(mapContextAlbum.put("map0", tciC).equals(tciC));
+
+        contextDistributor.clear();
+    }
+
+    private TestContextTreeMapItem getTestContextTreeMapItem() {
+        final Map<String, String> testHashMap = new HashMap<>();
+        testHashMap.put(_0, ZERO);
+        testHashMap.put("1", "one");
+        testHashMap.put("2", "two");
+        testHashMap.put("3", "three");
+        testHashMap.put("4", "four");
+
+        final TestContextTreeMapItem tciC = new TestContextTreeMapItem(testHashMap);
+        return tciC;
+    }
+
+    private TestContextDateLocaleItem getTestContextDateLocaleItem() {
+        final TestContextDateLocaleItem tciA = new TestContextDateLocaleItem();
+        tciA.setDateValue(new TestContextDateItem(new Date()));
+        tciA.setTZValue(TIME_ZONE.getDisplayName());
+        tciA.setDST(true);
+        tciA.setUTCOffset(-600);
+        tciA.setLocale(Locale.ENGLISH);
+        return tciA;
+    }
+
+    private ContextAlbum getContextAlbum(final String albumKey, final Distributor contextDistributor)
+            throws ContextException {
+        final ContextAlbum longContextAlbum =
+                contextDistributor.createContextAlbum(new AxArtifactKey(albumKey, VERSION));
+        assertNotNull(longContextAlbum);
+        longContextAlbum.setUserArtifactStack(USED_ARTIFACT_STACK_ARRAY);
+        return longContextAlbum;
+    }
+
+    private Distributor getDistributor() throws ContextException {
+        final AxArtifactKey distributorKey = new AxArtifactKey(APEX_DISTRIBUTOR, VERSION);
+        final Distributor contextDistributor = new DistributorFactory().getDistributor(distributorKey);
+
+
+        final AxContextModel multiModel = TestContextAlbumFactory.createMultiAlbumsContextModel();
+        contextDistributor.registerModel(multiModel);
+        return contextDistributor;
+    }
+}
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/SequentialContextInstantiation.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/SequentialContextInstantiation.java
new file mode 100644
index 0000000..e789ae9
--- /dev/null
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/SequentialContextInstantiation.java
@@ -0,0 +1,364 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.context.test.distribution;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.onap.policy.apex.context.test.factory.TestContextAlbumFactory.createMultiAlbumsContextModel;
+import static org.onap.policy.apex.context.test.utils.Constants.APEX_DISTRIBUTOR;
+import static org.onap.policy.apex.context.test.utils.Constants.BYTE_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.DATE_CONTEXT_ALBUM;
+import static org.onap.policy.apex.context.test.utils.Constants.EXCEPTION_MESSAGE;
+import static org.onap.policy.apex.context.test.utils.Constants.FLOAT_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.INT_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.LONG_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.PI_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.STRING_GLOBAL_VAL;
+import static org.onap.policy.apex.context.test.utils.Constants.TIME_ZONE;
+import static org.onap.policy.apex.context.test.utils.Constants.USED_ARTIFACT_STACK_ARRAY;
+import static org.onap.policy.apex.context.test.utils.Constants.VERSION;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.TimeZone;
+
+import org.onap.policy.apex.context.ContextAlbum;
+import org.onap.policy.apex.context.ContextException;
+import org.onap.policy.apex.context.Distributor;
+import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
+import org.onap.policy.apex.context.test.concepts.TestContextBooleanItem;
+import org.onap.policy.apex.context.test.concepts.TestContextByteItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateTzItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDoubleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextFloatItem;
+import org.onap.policy.apex.context.test.concepts.TestContextIntItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongObjectItem;
+import org.onap.policy.apex.context.test.concepts.TestContextStringItem;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
+
+
+/**
+ * The Class SequentialContextInstantiation checks sequential initiation of context.
+ *
+ * @author Sergey Sachkov (sergey.sachkov@ericsson.com)
+ */
+public class SequentialContextInstantiation {
+    private static final String DV1 = "dv1";
+    private static final String DV0 = "dv0";
+    // Logger for this class
+    private static final XLogger LOGGER = XLoggerFactory.getXLogger(SequentialContextInstantiation.class);
+
+    /**
+     * Test sequential context instantiation.
+     *
+     * @throws ContextException the context exception
+     */
+    public void testSequentialContextInstantiation() throws ContextException {
+        LOGGER.debug("Running TestContextInstantiation test . . .");
+
+        final Distributor contextDistributor = getDistributor();
+
+        try {
+            final ContextAlbum dateAlbum = getContextAlbum(DATE_CONTEXT_ALBUM, contextDistributor);
+            final Date testDate = new Date();
+            final TestContextDateLocaleItem tciA00 = getTestContextDateLocaleItem();
+
+            dateAlbum.put(DV0, tciA00);
+            assertEquals(tciA00, dateAlbum.get(DV0));
+
+            dateAlbum.put(DV1, tciA00);
+            assertEquals(tciA00, dateAlbum.get(DV1));
+
+            final TestContextDateTzItem tci9 = getTestContextDateTzItem(testDate);
+
+            try {
+                dateAlbum.put("tci9", tci9);
+            } catch (final Exception e) {
+                final String message = "class \"" + TestContextDateTzItem.class.getCanonicalName()
+                        + "\" not compatible with class \"" + TestContextDateLocaleItem.class.getCanonicalName() + "\"";
+                assertTrue(e.getMessage().contains(message));
+            }
+
+            final TestContextDateLocaleItem tciA01 = new TestContextDateLocaleItem(tciA00);
+            final TestContextDateLocaleItem tciA02 = new TestContextDateLocaleItem(tciA00);
+            final TestContextDateLocaleItem tciA03 = new TestContextDateLocaleItem(tciA00);
+
+            final Map<String, Object> valueMap0 = new HashMap<>();
+            valueMap0.put("Item01", tciA01);
+            valueMap0.put("Item02", tciA02);
+            valueMap0.put("Item03", tciA03);
+
+            dateAlbum.putAll(valueMap0);
+            assertEquals(5, dateAlbum.size());
+            assertEquals(tciA01, dateAlbum.get("Item01"));
+            assertEquals(tciA02, dateAlbum.get("Item02"));
+            assertEquals(tciA03, dateAlbum.get("Item03"));
+
+            final Map<String, Object> valueMap1 = getMap(testDate, tciA00, tci9);
+
+            // Get another reference to the album
+            final ContextAlbum dateAlbum1 = getContextAlbum(DATE_CONTEXT_ALBUM, contextDistributor);
+
+            try {
+                dateAlbum1.putAll(valueMap1);
+                fail(EXCEPTION_MESSAGE);
+            } catch (final Exception e) {
+                assertTrue(e.getMessage().endsWith(
+                        "not compatible with class \"" + TestContextDateLocaleItem.class.getCanonicalName() + "\""));
+            }
+            assertEquals(5, dateAlbum1.size());
+
+            valueMap1.clear();
+            valueMap1.put("Item00_2", tciA00);
+            dateAlbum1.putAll(valueMap1);
+            assertEquals(6, dateAlbum1.size());
+
+            assertEquals(tciA00, dateAlbum1.get("Item00_2"));
+            dateAlbum.remove("Item00_2");
+            assertEquals(5, dateAlbum1.size());
+
+            final ContextAlbum dateAlbumCopy = getContextAlbum(DATE_CONTEXT_ALBUM, contextDistributor);
+
+            final Map<String, Object> valueMap2 = new HashMap<>();
+            valueMap2.put("Item04", tciA01);
+            valueMap2.put("Item05", tciA02);
+            valueMap2.put("Item06", tciA03);
+
+            dateAlbumCopy.putAll(valueMap2);
+            assertEquals(8, dateAlbumCopy.size());
+
+            assertEquals(tciA03, dateAlbumCopy.get("Item06"));
+
+            final Collection<Object> mapValues = dateAlbum.values();
+            assertTrue(dateAlbumCopy.values().containsAll(mapValues));
+
+            // Check that clearing works
+            dateAlbum1.clear();
+            assertTrue(dateAlbum1.isEmpty());
+
+
+            dateAlbum.put("Item00", tciA00);
+            final Map<String, Object> valueMap3 = new HashMap<>();
+            valueMap3.put("Item01", tciA01);
+            valueMap3.put("Item02", tciA02);
+            valueMap3.put("Item03", tciA03);
+            dateAlbum.putAll(valueMap3);
+
+            final Map<String, Object> valueMap4 = new HashMap<>();
+            valueMap4.put("Item04", tciA01);
+            valueMap4.put("Item05", tciA02);
+            valueMap4.put("Item06", tciA03);
+
+            dateAlbumCopy.putAll(valueMap4);
+
+            assertContains(dateAlbum, tciA01);
+
+            final Set<Entry<String, Object>> entrySet = dateAlbum.entrySet();
+            assertEquals(7, entrySet.size());
+
+            assertAlbumGetAndPutMethods(dateAlbum, tciA03, tciA00);
+
+            // Should do removes
+            dateAlbum.remove("TestAA");
+            dateAlbum.remove("TestAB");
+            dateAlbum.remove("ItemNull");
+            assertEquals(7, entrySet.size());
+            assertTrue(dateAlbumCopy.values().containsAll(mapValues));
+            // CHECKSTYLE:ON: checkstyle:magicNumber
+        } finally {
+            contextDistributor.clear();
+        }
+    }
+
+    private void assertContains(final ContextAlbum dateAlbum, final TestContextDateLocaleItem tciA01) {
+        try {
+            dateAlbum.containsKey(null);
+            fail(EXCEPTION_MESSAGE);
+        } catch (final Exception e) {
+            assertEquals("null values are illegal on method parameter \"key\"", e.getMessage());
+        }
+
+        assertTrue(dateAlbum.containsKey("Item05"));
+        assertTrue(!dateAlbum.containsKey("Item07"));
+
+        try {
+            dateAlbum.containsValue(null);
+        } catch (final Exception e) {
+            assertEquals("null values are illegal on method parameter \"value\"", e.getMessage());
+
+        }
+
+        assertTrue(dateAlbum.containsValue(tciA01));
+        assertTrue(!dateAlbum.containsValue("Hello"));
+    }
+
+    private void assertAlbumGetAndPutMethods(final ContextAlbum dateAlbum, final TestContextDateLocaleItem tciA03,
+            final TestContextDateLocaleItem tciA00) {
+        try {
+            dateAlbum.get(null);
+            fail(EXCEPTION_MESSAGE);
+        } catch (final Exception e) {
+            assertEquals("album \"DateContextAlbum:0.0.1\" null keys are illegal on keys for get()", e.getMessage());
+        }
+
+        final Object aObject = dateAlbum.get("Item03");
+        assertEquals(tciA03, aObject);
+        try {
+            dateAlbum.put(null, null);
+            fail(EXCEPTION_MESSAGE);
+        } catch (final Exception e) {
+            assertEquals("album \"DateContextAlbum:0.0.1\" null keys are illegal on keys for put()", e.getMessage());
+        }
+
+        // Put null ContextItem should work (return null)
+        try {
+            dateAlbum.put("ItemNull", null);
+        } catch (final Exception e) {
+            assertEquals("album \"DateContextAlbum:0.0.1\" null values are illegal on key \"ItemNull\" for put()",
+                    e.getMessage());
+        }
+
+        // Should return null
+        assertNull(dateAlbum.get("ItemNull"));
+        // Put should return the previous contextItem
+        tciA00.setDST(false);
+        final TestContextDateLocaleItem tciA03_clone = new TestContextDateLocaleItem(tciA03);
+        tciA03_clone.setDST(true);
+        TestContextDateLocaleItem retItem = (TestContextDateLocaleItem) dateAlbum.put("Item03", tciA03_clone);
+        assertEquals(tciA03, retItem);
+        retItem = (TestContextDateLocaleItem) dateAlbum.put("Item03", tciA03);
+        assertEquals(tciA03_clone, retItem);
+
+        try {
+            dateAlbum.put("ItemNull", null);
+            fail(EXCEPTION_MESSAGE);
+
+        } catch (final Exception e) {
+            assert (e.getMessage()
+                    .equals("album \"DateContextAlbum:0.0.1\" null values are illegal on key \"ItemNull\" for put()"));
+        }
+
+        dateAlbum.put("TestAA", tciA00);
+        assertEquals(tciA00, dateAlbum.get("TestAA"));
+
+        // Should print warning
+        try {
+            dateAlbum.put("TestAA", null);
+            fail(EXCEPTION_MESSAGE);
+        } catch (final Exception e) {
+            assertEquals("album \"DateContextAlbum:0.0.1\" null values are illegal on key \"TestAA\" for put()",
+                    e.getMessage());
+        }
+        assertEquals(8, dateAlbum.size());
+        try {
+            dateAlbum.put("TestAB", null);
+            fail(EXCEPTION_MESSAGE);
+        } catch (final Exception e) {
+            assertEquals("album \"DateContextAlbum:0.0.1\" null values are illegal on key \"TestAB\" for put()",
+                    e.getMessage());
+        }
+        assertEquals(8, dateAlbum.size());
+    }
+
+    private Map<String, Object> getMap(final Date testDate, final TestContextDateLocaleItem tciA00,
+            final TestContextDateTzItem tci9) {
+        final TestContextBooleanItem testBadItem000 = new TestContextBooleanItem();
+        final TestContextByteItem testBadItem001 = new TestContextByteItem();
+        final TestContextIntItem testBadItem002 = new TestContextIntItem();
+        final TestContextLongItem testBadItem003 = new TestContextLongItem();
+        final TestContextFloatItem testBadItem004 = new TestContextFloatItem();
+        final TestContextDoubleItem testBadItem005 = new TestContextDoubleItem();
+        final TestContextStringItem testBadItem006 = new TestContextStringItem();
+        final TestContextLongObjectItem testBadItem007 = new TestContextLongObjectItem();
+        final TestContextDateItem testBadItem008 = new TestContextDateItem();
+
+        testBadItem000.setFlag(false);
+        testBadItem001.setByteValue(BYTE_VAL);
+        testBadItem002.setIntValue(INT_VAL);
+        testBadItem003.setLongValue(LONG_VAL);
+        testBadItem004.setFloatValue(new Float(FLOAT_VAL));
+        testBadItem005.setDoubleValue(PI_VAL);
+        testBadItem006.setStringValue(STRING_GLOBAL_VAL);
+        testBadItem007.setLongValue(testDate.getTime());
+        testBadItem008.setDateValue(testDate);
+
+        final Map<String, Object> values = new HashMap<>();
+        values.put("TestBadItem000", testBadItem000);
+        values.put("TestBadItem001", testBadItem001);
+        values.put("TestBadItem002", testBadItem002);
+        values.put("TestBadItem003", testBadItem003);
+        values.put("TestBadItem004", testBadItem004);
+        values.put("TestBadItem005", testBadItem005);
+        values.put("TestBadItem006", testBadItem006);
+        values.put("TestBadItem007", testBadItem007);
+        values.put("TestBadItem008", testBadItem008);
+        values.put("TestBadItem009", tci9);
+        values.put("Item00_2", tciA00);
+        return values;
+    }
+
+    private TestContextDateTzItem getTestContextDateTzItem(final Date testDate) {
+        final TestContextDateTzItem tci9 = new TestContextDateTzItem();
+        tci9.setDateValue(new TestContextDateItem(testDate));
+        tci9.setTZValue(TimeZone.getTimeZone("Europe/Dublin").getDisplayName());
+        tci9.setDST(true);
+        return tci9;
+    }
+
+    private TestContextDateLocaleItem getTestContextDateLocaleItem() {
+        final TestContextDateLocaleItem tciA00 = new TestContextDateLocaleItem();
+        tciA00.setDateValue(new TestContextDateItem(new Date()));
+        tciA00.setTZValue(TIME_ZONE.getDisplayName());
+        tciA00.setDST(true);
+        tciA00.setUTCOffset(-600);
+        tciA00.setLocale(Locale.ENGLISH);
+        return tciA00;
+    }
+
+    private ContextAlbum getContextAlbum(final String albumName, final Distributor contextDistributor)
+            throws ContextException {
+        final ContextAlbum dateAlbum = contextDistributor.createContextAlbum(new AxArtifactKey(albumName, VERSION));
+        assertNotNull(dateAlbum);
+        dateAlbum.setUserArtifactStack(USED_ARTIFACT_STACK_ARRAY);
+        return dateAlbum;
+    }
+
+    private Distributor getDistributor() throws ContextException {
+        final AxArtifactKey distributorKey = new AxArtifactKey(APEX_DISTRIBUTOR, VERSION);
+        final Distributor contextDistributor = new DistributorFactory().getDistributor(distributorKey);
+        contextDistributor.registerModel(createMultiAlbumsContextModel());
+        return contextDistributor;
+    }
+}
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/package-info.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/package-info.java
similarity index 100%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/package-info.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/distribution/package-info.java
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/factory/TestContextAlbumFactory.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/factory/TestContextAlbumFactory.java
similarity index 63%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/factory/TestContextAlbumFactory.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/factory/TestContextAlbumFactory.java
index 64de009..3003344 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/factory/TestContextAlbumFactory.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/factory/TestContextAlbumFactory.java
@@ -20,6 +20,20 @@
 
 package org.onap.policy.apex.context.test.factory;
 
+import static org.onap.policy.apex.context.test.utils.Constants.DATE_CONTEXT_ALBUM;
+import static org.onap.policy.apex.context.test.utils.Constants.EXTERNAL_CONTEXT_ALBUM;
+import static org.onap.policy.apex.context.test.utils.Constants.GLOBAL_CONTEXT_ALBUM;
+import static org.onap.policy.apex.context.test.utils.Constants.LONG_CONTEXT_ALBUM;
+import static org.onap.policy.apex.context.test.utils.Constants.MAP_CONTEXT_ALBUM;
+import static org.onap.policy.apex.context.test.utils.Constants.POLICY_CONTEXT_ALBUM;
+import static org.onap.policy.apex.context.test.utils.Constants.VERSION;
+
+import org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
+import org.onap.policy.apex.context.test.concepts.TestContextTreeMapItem;
+import org.onap.policy.apex.context.test.concepts.TestExternalContextItem;
+import org.onap.policy.apex.context.test.concepts.TestGlobalContextItem;
+import org.onap.policy.apex.context.test.concepts.TestPolicyContextItem;
 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
 import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation;
 import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum;
@@ -34,6 +48,11 @@
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 public final class TestContextAlbumFactory {
+
+    private static final String APPLICATION = "APPLICATION";
+    private static final String JAVA_LONG = Long.class.getCanonicalName();
+    private static final String JAVA_FLAVOUR = "Java";
+
     /**
      * Default constructor to prevent sub-classing.
      */
@@ -45,19 +64,19 @@
      * @return the ax context model
      */
     public static AxContextModel createPolicyContextModel() {
-        final AxContextSchema policySchema = new AxContextSchema(new AxArtifactKey("PolicySchema", "0.0.1"), "Java",
-                "org.onap.policy.apex.context.test.concepts.TestPolicyContextItem");
-        final AxContextAlbum albumDefinition = new AxContextAlbum(new AxArtifactKey("PolicyContextAlbum", "0.0.1"),
-                "APPLICATION", true, policySchema.getKey());
+        final AxContextSchema policySchema = new AxContextSchema(new AxArtifactKey("PolicySchema", VERSION),
+                JAVA_FLAVOUR, TestPolicyContextItem.class.getCanonicalName());
+        final AxContextAlbum albumDefinition = new AxContextAlbum(new AxArtifactKey(POLICY_CONTEXT_ALBUM, VERSION),
+                APPLICATION, true, policySchema.getKey());
 
-        final AxContextSchemas schemas = new AxContextSchemas(new AxArtifactKey("Schemas", "0.0.1"));
+        final AxContextSchemas schemas = new AxContextSchemas(new AxArtifactKey("Schemas", VERSION));
         schemas.getSchemasMap().put(policySchema.getKey(), policySchema);
-        final AxContextAlbums albums = new AxContextAlbums(new AxArtifactKey("context", "0.0.1"));
+        final AxContextAlbums albums = new AxContextAlbums(new AxArtifactKey("context", VERSION));
         albums.getAlbumsMap().put(albumDefinition.getKey(), albumDefinition);
 
-        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", "0.0.1"));
+        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", VERSION));
         final AxContextModel contextModel =
-                new AxContextModel(new AxArtifactKey("PolicyContextModel", "0.0.1"), schemas, albums, keyInformation);
+                new AxContextModel(new AxArtifactKey("PolicyContextModel", VERSION), schemas, albums, keyInformation);
         contextModel.setKeyInformation(keyInformation);
         keyInformation.generateKeyInfo(contextModel);
 
@@ -70,19 +89,19 @@
      * @return the ax context model
      */
     public static AxContextModel createGlobalContextModel() {
-        final AxContextSchema globalSchema = new AxContextSchema(new AxArtifactKey("GlobalSchema", "0.0.1"), "Java",
-                "org.onap.policy.apex.context.test.concepts.TestGlobalContextItem");
-        final AxContextAlbum albumDefinition = new AxContextAlbum(new AxArtifactKey("GlobalContextAlbum", "0.0.1"),
+        final AxContextSchema globalSchema = new AxContextSchema(new AxArtifactKey("GlobalSchema", VERSION),
+                JAVA_FLAVOUR, TestGlobalContextItem.class.getCanonicalName());
+        final AxContextAlbum albumDefinition = new AxContextAlbum(new AxArtifactKey(GLOBAL_CONTEXT_ALBUM, VERSION),
                 "GLOBAL", true, globalSchema.getKey());
 
-        final AxContextSchemas schemas = new AxContextSchemas(new AxArtifactKey("Schemas", "0.0.1"));
+        final AxContextSchemas schemas = new AxContextSchemas(new AxArtifactKey("Schemas", VERSION));
         schemas.getSchemasMap().put(globalSchema.getKey(), globalSchema);
-        final AxContextAlbums albums = new AxContextAlbums(new AxArtifactKey("context", "0.0.1"));
+        final AxContextAlbums albums = new AxContextAlbums(new AxArtifactKey("context", VERSION));
         albums.getAlbumsMap().put(albumDefinition.getKey(), albumDefinition);
 
-        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", "0.0.1"));
+        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", VERSION));
         final AxContextModel contextModel =
-                new AxContextModel(new AxArtifactKey("GlobalContextModel", "0.0.1"), schemas, albums, keyInformation);
+                new AxContextModel(new AxArtifactKey("GlobalContextModel", VERSION), schemas, albums, keyInformation);
         contextModel.setKeyInformation(keyInformation);
         keyInformation.generateKeyInfo(contextModel);
 
@@ -95,19 +114,19 @@
      * @return the ax context model
      */
     public static AxContextModel createExternalContextModel() {
-        final AxContextSchema externalSchema = new AxContextSchema(new AxArtifactKey("ExternalSchema", "0.0.1"), "Java",
-                "org.onap.policy.apex.context.test.concepts.TestExternalContextItem");
-        final AxContextAlbum albumDefinition = new AxContextAlbum(new AxArtifactKey("ExternalContextAlbum", "0.0.1"),
+        final AxContextSchema externalSchema = new AxContextSchema(new AxArtifactKey("ExternalSchema", VERSION),
+                JAVA_FLAVOUR, TestExternalContextItem.class.getCanonicalName());
+        final AxContextAlbum albumDefinition = new AxContextAlbum(new AxArtifactKey(EXTERNAL_CONTEXT_ALBUM, VERSION),
                 "EXTERNAL", true, externalSchema.getKey());
 
-        final AxContextSchemas schemas = new AxContextSchemas(new AxArtifactKey("Schemas", "0.0.1"));
+        final AxContextSchemas schemas = new AxContextSchemas(new AxArtifactKey("Schemas", VERSION));
         schemas.getSchemasMap().put(externalSchema.getKey(), externalSchema);
-        final AxContextAlbums albums = new AxContextAlbums(new AxArtifactKey("context", "0.0.1"));
+        final AxContextAlbums albums = new AxContextAlbums(new AxArtifactKey("context", VERSION));
         albums.getAlbumsMap().put(albumDefinition.getKey(), albumDefinition);
 
-        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", "0.0.1"));
+        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", VERSION));
         final AxContextModel contextModel =
-                new AxContextModel(new AxArtifactKey("ExternalContextModel", "0.0.1"), schemas, albums, keyInformation);
+                new AxContextModel(new AxArtifactKey("ExternalContextModel", VERSION), schemas, albums, keyInformation);
         contextModel.setKeyInformation(keyInformation);
         keyInformation.generateKeyInfo(contextModel);
 
@@ -120,22 +139,26 @@
      * @return the ax context model
      */
     public static AxContextModel createLongContextModel() {
-        final AxContextSchema longSchema =
-                new AxContextSchema(new AxArtifactKey("LongSchema", "0.0.1"), "Java", "java.lang.Long");
-        final AxContextAlbum albumDefinition1 = new AxContextAlbum(new AxArtifactKey("LongContextAlbum1", "0.0.1"),
-                "APPLICATION", true, longSchema.getKey());
-        final AxContextAlbum albumDefinition2 = new AxContextAlbum(new AxArtifactKey("LongContextAlbum2", "0.0.1"),
-                "APPLICATION", true, longSchema.getKey());
+        final AxArtifactKey longSchemaKey = new AxArtifactKey("LongSchema", VERSION);
+        final AxContextSchema longSchema = new AxContextSchema(longSchemaKey, JAVA_FLAVOUR, JAVA_LONG);
 
-        final AxContextSchemas schemas = new AxContextSchemas(new AxArtifactKey("Schemas", "0.0.1"));
+        final AxArtifactKey longContextAlbumKey = new AxArtifactKey("LongContextAlbum1", VERSION);
+        final AxContextAlbum albumDefinition1 =
+                new AxContextAlbum(longContextAlbumKey, APPLICATION, true, longSchema.getKey());
+
+        final AxArtifactKey longContextAlbumKey2 = new AxArtifactKey("LongContextAlbum2", VERSION);
+        final AxContextAlbum albumDefinition2 =
+                new AxContextAlbum(longContextAlbumKey2, APPLICATION, true, longSchema.getKey());
+
+        final AxContextSchemas schemas = new AxContextSchemas(new AxArtifactKey("Schemas", VERSION));
         schemas.getSchemasMap().put(longSchema.getKey(), longSchema);
-        final AxContextAlbums albums = new AxContextAlbums(new AxArtifactKey("context", "0.0.1"));
+        final AxContextAlbums albums = new AxContextAlbums(new AxArtifactKey("context", VERSION));
         albums.getAlbumsMap().put(albumDefinition1.getKey(), albumDefinition1);
         albums.getAlbumsMap().put(albumDefinition2.getKey(), albumDefinition2);
 
-        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", "0.0.1"));
+        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", VERSION));
         final AxContextModel contextModel =
-                new AxContextModel(new AxArtifactKey("LongContextModel", "0.0.1"), schemas, albums, keyInformation);
+                new AxContextModel(new AxArtifactKey("LongContextModel", VERSION), schemas, albums, keyInformation);
         contextModel.setKeyInformation(keyInformation);
         keyInformation.generateKeyInfo(contextModel);
 
@@ -149,41 +172,42 @@
      */
     public static AxContextModel createMultiAlbumsContextModel() {
         final AxContextSchema longSchema =
-                new AxContextSchema(new AxArtifactKey("LongSchema", "0.0.1"), "Java", "java.lang.Long");
-        final AxContextSchema lTypeSchema = new AxContextSchema(new AxArtifactKey("LTypeSchema", "0.0.1"), "Java",
-                "org.onap.policy.apex.context.test.concepts.TestContextItem003");
-        final AxContextSchema dateSchema = new AxContextSchema(new AxArtifactKey("DateSchema", "0.0.1"), "Java",
-                "org.onap.policy.apex.context.test.concepts.TestContextItem00A");
-        final AxContextSchema mapSchema = new AxContextSchema(new AxArtifactKey("MapSchema", "0.0.1"), "Java",
-                "org.onap.policy.apex.context.test.concepts.TestContextItem00C");
+                new AxContextSchema(new AxArtifactKey("LongSchema", VERSION), JAVA_FLAVOUR, JAVA_LONG);
+        final AxContextSchema lTypeSchema = new AxContextSchema(new AxArtifactKey("LTypeSchema", VERSION), JAVA_FLAVOUR,
+                TestContextLongItem.class.getCanonicalName());
+        final AxContextSchema dateSchema = new AxContextSchema(new AxArtifactKey("DateSchema", VERSION), JAVA_FLAVOUR,
+                TestContextDateLocaleItem.class.getCanonicalName());
+        final AxContextSchema mapSchema = new AxContextSchema(new AxArtifactKey("MapSchema", VERSION), JAVA_FLAVOUR,
+                TestContextTreeMapItem.class.getCanonicalName());
 
-        final AxContextSchemas schemas = new AxContextSchemas(new AxArtifactKey("Schemas", "0.0.1"));
+        final AxContextSchemas schemas = new AxContextSchemas(new AxArtifactKey("Schemas", VERSION));
         schemas.getSchemasMap().put(longSchema.getKey(), longSchema);
         schemas.getSchemasMap().put(lTypeSchema.getKey(), lTypeSchema);
         schemas.getSchemasMap().put(dateSchema.getKey(), dateSchema);
         schemas.getSchemasMap().put(mapSchema.getKey(), mapSchema);
 
-        final AxContextAlbum longAlbumDefinition = new AxContextAlbum(new AxArtifactKey("LongContextAlbum", "0.0.1"),
-                "APPLICATION", true, longSchema.getKey());
-        final AxContextAlbum lTypeAlbumDefinition = new AxContextAlbum(new AxArtifactKey("LTypeContextAlbum", "0.0.1"),
-                "APPLICATION", true, lTypeSchema.getKey());
-        final AxContextAlbum dateAlbumDefinition = new AxContextAlbum(new AxArtifactKey("DateContextAlbum", "0.0.1"),
-                "APPLICATION", true, dateSchema.getKey());
-        final AxContextAlbum mapAlbumDefinition = new AxContextAlbum(new AxArtifactKey("MapContextAlbum", "0.0.1"),
-                "APPLICATION", true, mapSchema.getKey());
+        final AxContextAlbum longAlbumDefinition = new AxContextAlbum(new AxArtifactKey(LONG_CONTEXT_ALBUM, VERSION),
+                APPLICATION, true, longSchema.getKey());
+        final AxContextAlbum lTypeAlbumDefinition = new AxContextAlbum(new AxArtifactKey("LTypeContextAlbum", VERSION),
+                APPLICATION, true, lTypeSchema.getKey());
+        final AxContextAlbum dateAlbumDefinition = new AxContextAlbum(new AxArtifactKey(DATE_CONTEXT_ALBUM, VERSION),
+                APPLICATION, true, dateSchema.getKey());
+        final AxContextAlbum mapAlbumDefinition = new AxContextAlbum(new AxArtifactKey(MAP_CONTEXT_ALBUM, VERSION),
+                APPLICATION, true, mapSchema.getKey());
 
-        final AxContextAlbums albums = new AxContextAlbums(new AxArtifactKey("context", "0.0.1"));
+        final AxContextAlbums albums = new AxContextAlbums(new AxArtifactKey("context", VERSION));
         albums.getAlbumsMap().put(longAlbumDefinition.getKey(), longAlbumDefinition);
         albums.getAlbumsMap().put(lTypeAlbumDefinition.getKey(), lTypeAlbumDefinition);
         albums.getAlbumsMap().put(dateAlbumDefinition.getKey(), dateAlbumDefinition);
         albums.getAlbumsMap().put(mapAlbumDefinition.getKey(), mapAlbumDefinition);
 
-        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", "0.0.1"));
-        final AxContextModel contextModel = new AxContextModel(new AxArtifactKey("MultiAlbumsContextModel", "0.0.1"),
+        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", VERSION));
+        final AxContextModel contextModel = new AxContextModel(new AxArtifactKey("MultiAlbumsContextModel", VERSION),
                 schemas, albums, keyInformation);
         contextModel.setKeyInformation(keyInformation);
         keyInformation.generateKeyInfo(contextModel);
 
         return contextModel;
     }
+
 }
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/factory/package-info.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/factory/package-info.java
similarity index 100%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/factory/package-info.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/factory/package-info.java
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContext.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContext.java
similarity index 79%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContext.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContext.java
index 35db5dd..2eea957 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContext.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContext.java
@@ -26,7 +26,7 @@
 import org.onap.policy.apex.context.ContextException;
 import org.onap.policy.apex.context.Distributor;
 import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
-import org.onap.policy.apex.context.test.concepts.TestContextItem003;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
 import org.onap.policy.apex.context.test.factory.TestContextAlbumFactory;
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -141,28 +141,28 @@
         lTypeAlbum.setUserArtifactStack(usedArtifactStackArray);
 
         // CHECKSTYLE:OFF: checkstyle:magicNumber
-        lTypeAlbum.put("lTypeValue0", new TestContextItem003(0xFFFFFFFFFFFFFFFFL));
-        lTypeAlbum.put("lTypeValue1", new TestContextItem003(0xFFFFFFFFFFFFFFFEL));
-        lTypeAlbum.put("lTypeValue2", new TestContextItem003(0xFFFFFFFFFFFFFFFDL));
-        lTypeAlbum.put("lTypeValue3", new TestContextItem003(0xFFFFFFFFFFFFFFFCL));
-        lTypeAlbum.put("lTypeValue4", new TestContextItem003(0xFFFFFFFFFFFFFFFBL));
-        lTypeAlbum.put("lTypeValue5", new TestContextItem003(0xFFFFFFFFFFFFFFFAL));
-        lTypeAlbum.put("lTypeValue6", new TestContextItem003(0xFFFFFFFFFFFFFFF9L));
-        lTypeAlbum.put("lTypeValue7", new TestContextItem003(0xFFFFFFFFFFFFFFF8L));
-        lTypeAlbum.put("lTypeValue8", new TestContextItem003(0xFFFFFFFFFFFFFFF7L));
-        lTypeAlbum.put("lTypeValue9", new TestContextItem003(0xFFFFFFFFFFFFFFF6L));
-        lTypeAlbum.put("lTypeValueA", new TestContextItem003(0xFFFFFFFFFFFFFFF5L));
-        lTypeAlbum.put("lTypeValueB", new TestContextItem003(0xFFFFFFFFFFFFFFF4L));
-        lTypeAlbum.put("lTypeValueC", new TestContextItem003(0xFFFFFFFFFFFFFFF3L));
-        lTypeAlbum.put("lTypeValueD", new TestContextItem003(0xFFFFFFFFFFFFFFF2L));
-        lTypeAlbum.put("lTypeValueE", new TestContextItem003(0xFFFFFFFFFFFFFFF1L));
-        lTypeAlbum.put("lTypeValueF", new TestContextItem003(0xFFFFFFFFFFFFFFF0L));
+        lTypeAlbum.put("lTypeValue0", new TestContextLongItem(0xFFFFFFFFFFFFFFFFL));
+        lTypeAlbum.put("lTypeValue1", new TestContextLongItem(0xFFFFFFFFFFFFFFFEL));
+        lTypeAlbum.put("lTypeValue2", new TestContextLongItem(0xFFFFFFFFFFFFFFFDL));
+        lTypeAlbum.put("lTypeValue3", new TestContextLongItem(0xFFFFFFFFFFFFFFFCL));
+        lTypeAlbum.put("lTypeValue4", new TestContextLongItem(0xFFFFFFFFFFFFFFFBL));
+        lTypeAlbum.put("lTypeValue5", new TestContextLongItem(0xFFFFFFFFFFFFFFFAL));
+        lTypeAlbum.put("lTypeValue6", new TestContextLongItem(0xFFFFFFFFFFFFFFF9L));
+        lTypeAlbum.put("lTypeValue7", new TestContextLongItem(0xFFFFFFFFFFFFFFF8L));
+        lTypeAlbum.put("lTypeValue8", new TestContextLongItem(0xFFFFFFFFFFFFFFF7L));
+        lTypeAlbum.put("lTypeValue9", new TestContextLongItem(0xFFFFFFFFFFFFFFF6L));
+        lTypeAlbum.put("lTypeValueA", new TestContextLongItem(0xFFFFFFFFFFFFFFF5L));
+        lTypeAlbum.put("lTypeValueB", new TestContextLongItem(0xFFFFFFFFFFFFFFF4L));
+        lTypeAlbum.put("lTypeValueC", new TestContextLongItem(0xFFFFFFFFFFFFFFF3L));
+        lTypeAlbum.put("lTypeValueD", new TestContextLongItem(0xFFFFFFFFFFFFFFF2L));
+        lTypeAlbum.put("lTypeValueE", new TestContextLongItem(0xFFFFFFFFFFFFFFF1L));
+        lTypeAlbum.put("lTypeValueF", new TestContextLongItem(0xFFFFFFFFFFFFFFF0L));
         LOGGER.debug(lTypeAlbum.toString());
         assert (lTypeAlbum.size() >= 16);
         // CHECKSTYLE:ON: checkstyle:magicNumber
 
         // The initial value for concurrent testing
-        final TestContextItem003 item = new TestContextItem003(0L);
+        final TestContextLongItem item = new TestContextLongItem(0L);
         lTypeAlbum.put("testValue", item);
 
     }
@@ -180,11 +180,11 @@
             throws ContextException {
         try {
             LOGGER.debug("threads finished, end value is {}",
-                    ((TestContextItem003) lTypeAlbum.get("testValue")).getLongValue());
+                    ((TestContextLongItem) lTypeAlbum.get("testValue")).getLongValue());
         } catch (final Exception exception) {
             LOGGER.error("Error: ", exception);
         }
-        final long total = ((TestContextItem003) lTypeAlbum.get("testValue")).getLongValue();
+        final long total = ((TestContextLongItem) lTypeAlbum.get("testValue")).getLongValue();
 
         contextDistributor.clear();
         contextDistributor = null;
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java
similarity index 100%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVM.java
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java
similarity index 97%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java
index 020eed8..da2741f 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextJVMThread.java
@@ -79,7 +79,7 @@
                 + System.getProperty("file.separator") + "java");
         commandList.add("-cp");
         commandList.add(System.getProperty("java.class.path"));
-        commandList.add("org.onap.policy.apex.context.test.locking.ConcurrentContextJVM");
+        commandList.add(ConcurrentContextJVM.class.getCanonicalName());
         commandList.add(testType);
         commandList.add(new Integer(jvm).toString());
         commandList.add(new Integer(threadCount).toString());
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextThread.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextThread.java
similarity index 94%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextThread.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextThread.java
index 42e3e09..554c3d0 100644
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextThread.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/ConcurrentContextThread.java
@@ -25,7 +25,7 @@
 import org.onap.policy.apex.context.Distributor;
 import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
 import org.onap.policy.apex.context.parameters.ContextParameters;
-import org.onap.policy.apex.context.test.concepts.TestContextItem003;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
 import org.onap.policy.apex.context.test.factory.TestContextAlbumFactory;
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -109,7 +109,7 @@
 
         try {
             lTypeAlbum.lockForWriting("testValue");
-            final TestContextItem003 item = (TestContextItem003) lTypeAlbum.get("testValue");
+            final TestContextLongItem item = (TestContextLongItem) lTypeAlbum.get("testValue");
             final long value = item.getLongValue();
             LOGGER.info("completed TestConcurrentContextThread_" + jvm + "_" + instance + ", value=" + value);
         } catch (final Exception e) {
@@ -130,12 +130,12 @@
         for (int i = 0; i < threadLoops; i++) {
             try {
                 lTypeAlbum.lockForWriting("testValue");
-                TestContextItem003 item = (TestContextItem003) lTypeAlbum.get("testValue");
+                TestContextLongItem item = (TestContextLongItem) lTypeAlbum.get("testValue");
                 if (item != null) {
                     long value = item.getLongValue();
                     item.setLongValue(++value);
                 } else {
-                    item = new TestContextItem003(0L);
+                    item = new TestContextLongItem(0L);
                 }
                 lTypeAlbum.put("testValue", item);
             } finally {
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/locking/package-info.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/package-info.java
similarity index 100%
rename from context/context-test/src/main/java/org/onap/policy/apex/context/test/locking/package-info.java
rename to context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/locking/package-info.java
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/Constants.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/Constants.java
new file mode 100644
index 0000000..90e586e
--- /dev/null
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/utils/Constants.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed 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.
+ * 
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.policy.apex.context.test.utils;
+
+import java.util.TimeZone;
+
+import org.onap.policy.apex.context.test.concepts.TestPolicyContextItem;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+
+public class Constants {
+    public static final String MAP_CONTEXT_ALBUM = "MapContextAlbum";
+    public static final String LONG_CONTEXT_ALBUM = "LongContextAlbum";
+    public static final String DATE_CONTEXT_ALBUM = "DateContextAlbum";
+
+    public static final String EXTERNAL_CONTEXT_ALBUM = "ExternalContextAlbum";
+    public static final String GLOBAL_CONTEXT_ALBUM = "GlobalContextAlbum";
+    public static final String POLICY_CONTEXT_ALBUM = "PolicyContextAlbum";
+
+    public static final String APEX_DISTRIBUTOR = "ApexDistributor";
+    public static final String VERSION = "0.0.1";
+    public static final int INT_VAL = 0xFFFFFFFF;
+    public static final int INT_VAL_2 = 2000;
+    public static final int INT_VAL_3 = -1;
+    public static final String EXCEPTION_MESSAGE = "Test should throw an exception";
+    public static final byte BYTE_VAL = (byte) 0xFF;
+    public static final double PI_VAL = Math.PI;
+    public static final float FLOAT_VAL = 3.14159265359f;
+    public static final String EXTERNAL_CONTEXT = "externalContext";
+    public static final String GLOBAL_CONTEXT_KEY = "globalContext";
+    public static final String STRING_GLOBAL_VAL = "This is a global context string";
+    public static final String STRING_VAL = "This is a policy context string";
+    public static final String STRING_EXT_VAL = "This is an external context string";
+    public static final long LONG_VAL = 0xFFFFFFFFFFFFFFFFL;
+    public static final String TEST_POLICY_CONTEXT_ITEM = TestPolicyContextItem.class.getName();
+    public static final TimeZone TIME_ZONE = TimeZone.getTimeZone("Europe/Dublin");
+
+    public static final AxArtifactKey[] USED_ARTIFACT_STACK_ARRAY = {new AxArtifactKey("testC-top", VERSION),
+            new AxArtifactKey("testC-next", VERSION), new AxArtifactKey("testC-bot", VERSION)};
+
+    private Constants() {}
+
+}
diff --git a/context/context-test/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextAlbumUpdate.java b/context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextAlbumUpdate.java
similarity index 92%
rename from context/context-test/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextAlbumUpdate.java
rename to context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextAlbumUpdate.java
index 7d5693d..105b59e 100644
--- a/context/context-test/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextAlbumUpdate.java
+++ b/context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextAlbumUpdate.java
@@ -25,6 +25,7 @@
 
 import org.junit.After;
 import org.junit.Test;
+import org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor;
 import org.onap.policy.apex.context.parameters.ContextParameters;
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
@@ -40,8 +41,7 @@
         logger.debug("Running testContextAlbumUpdateJVMLocalVarSet test . . .");
 
         final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters()
-                .setPluginClass("org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor");
+        contextParameters.getDistributorParameters().setPluginClass(JVMLocalDistributor.class.getCanonicalName());
         new ContextAlbumUpdate().testContextAlbumUpdate();
 
         logger.debug("Ran testContextAlbumUpdateJVMLocalVarSet test");
diff --git a/context/context-test/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextInstantiation.java b/context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextInstantiation.java
similarity index 92%
rename from context/context-test/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextInstantiation.java
rename to context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextInstantiation.java
index f640b33..565a39f 100644
--- a/context/context-test/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextInstantiation.java
+++ b/context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextInstantiation.java
@@ -26,6 +26,7 @@
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor;
 import org.onap.policy.apex.context.parameters.ContextParameters;
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
@@ -55,8 +56,7 @@
         logger.debug("Running testContextInstantiationJVMLocalVarSet test . . .");
 
         final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters()
-                .setPluginClass("org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor");
+        contextParameters.getDistributorParameters().setPluginClass(JVMLocalDistributor.class.getCanonicalName());
         new ContextInstantiation().testContextInstantiation();
 
         logger.debug("Ran testContextInstantiationJVMLocalVarSet test");
diff --git a/context/context-test/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextUpdate.java b/context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextUpdate.java
similarity index 91%
rename from context/context-test/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextUpdate.java
rename to context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextUpdate.java
index d140b0d..1a9bc29 100644
--- a/context/context-test/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextUpdate.java
+++ b/context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/distribution/TestContextUpdate.java
@@ -23,6 +23,7 @@
 import java.io.IOException;
 
 import org.junit.Test;
+import org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor;
 import org.onap.policy.apex.context.parameters.ContextParameters;
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
@@ -43,8 +44,7 @@
         logger.debug("Running testContextUpdateJVMLocalVarSet test . . .");
 
         final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters()
-                .setPluginClass("org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor");
+        contextParameters.getDistributorParameters().setPluginClass(JVMLocalDistributor.class.getCanonicalName());
         new ContextUpdate().testContextUpdate();
 
         logger.debug("Ran testContextUpdateJVMLocalVarSet test");
diff --git a/context/context-test/src/test/java/org/onap/policy/apex/context/test/distribution/TestSequentialContextInstantiation.java b/context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/distribution/TestSequentialContextInstantiation.java
similarity index 92%
rename from context/context-test/src/test/java/org/onap/policy/apex/context/test/distribution/TestSequentialContextInstantiation.java
rename to context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/distribution/TestSequentialContextInstantiation.java
index 2798759..28bd7eb 100644
--- a/context/context-test/src/test/java/org/onap/policy/apex/context/test/distribution/TestSequentialContextInstantiation.java
+++ b/context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/distribution/TestSequentialContextInstantiation.java
@@ -26,6 +26,7 @@
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor;
 import org.onap.policy.apex.context.parameters.ContextParameters;
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
@@ -53,8 +54,7 @@
         logger.debug("Running testSequentialContextInstantiationJVMLocalVarSet test . . .");
 
         final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters()
-                .setPluginClass("org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor");
+        contextParameters.getDistributorParameters().setPluginClass(JVMLocalDistributor.class.getCanonicalName());
         new SequentialContextInstantiation().testSequentialContextInstantiation();
 
         logger.debug("Ran testSequentialContextInstantiationJVMLocalVarSet test");
diff --git a/context/context-test/src/test/java/org/onap/policy/apex/context/test/locking/TestConcurrentContext.java b/context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/locking/TestConcurrentContext.java
similarity index 88%
rename from context/context-test/src/test/java/org/onap/policy/apex/context/test/locking/TestConcurrentContext.java
rename to context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/locking/TestConcurrentContext.java
index 0f6626f..7788fb4 100644
--- a/context/context-test/src/test/java/org/onap/policy/apex/context/test/locking/TestConcurrentContext.java
+++ b/context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/locking/TestConcurrentContext.java
@@ -26,6 +26,8 @@
 import java.io.IOException;
 
 import org.junit.Test;
+import org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor;
+import org.onap.policy.apex.context.impl.locking.jvmlocal.JVMLocalLockManager;
 import org.onap.policy.apex.context.parameters.ContextParameters;
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
@@ -53,8 +55,7 @@
         logger.debug("Running testConcurrentContextJVMLocalVarSet test . . .");
 
         final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getLockManagerParameters()
-                .setPluginClass("org.onap.policy.apex.context.impl.locking.jvmlocal.JVMLocalLockManager");
+        contextParameters.getLockManagerParameters().setPluginClass(JVMLocalLockManager.class.getCanonicalName());
         final long result = new ConcurrentContext().testConcurrentContext("JVMLocalVarSet", TEST_JVM_COUNT_SINGLE_JVM,
                 TEST_THREAD_COUNT_SINGLE_JVM, TEST_THREAD_LOOPS);
 
@@ -81,10 +82,8 @@
         logger.debug("Running testConcurrentContextMultiJVMNoLock test . . .");
 
         final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters()
-                .setPluginClass("org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor");
-        contextParameters.getLockManagerParameters()
-                .setPluginClass("org.onap.policy.apex.context.impl.locking.jvmlocal.JVMLocalLockManager");
+        contextParameters.getDistributorParameters().setPluginClass(JVMLocalDistributor.class.getCanonicalName());
+        contextParameters.getLockManagerParameters().setPluginClass(JVMLocalLockManager.class.getCanonicalName());
 
         final long result = new ConcurrentContext().testConcurrentContext("testConcurrentContextMultiJVMNoLock",
                 TEST_JVM_COUNT_MULTI_JVM, TEST_THREAD_COUNT_MULTI_JVM, TEST_THREAD_LOOPS);
diff --git a/context/context-test/src/test/java/org/onap/policy/apex/context/test/persistence/TestPersistentContextInstantiation.java b/context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/persistence/TestPersistentContextInstantiation.java
similarity index 79%
rename from context/context-test/src/test/java/org/onap/policy/apex/context/test/persistence/TestPersistentContextInstantiation.java
rename to context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/persistence/TestPersistentContextInstantiation.java
index db1ac47..a059285 100644
--- a/context/context-test/src/test/java/org/onap/policy/apex/context/test/persistence/TestPersistentContextInstantiation.java
+++ b/context/context-test-utils/src/test/java/org/onap/policy/apex/context/test/persistence/TestPersistentContextInstantiation.java
@@ -40,10 +40,10 @@
 import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
 import org.onap.policy.apex.context.parameters.ContextParameters;
 import org.onap.policy.apex.context.parameters.PersistorParameters;
-import org.onap.policy.apex.context.test.concepts.TestContextItem003;
-import org.onap.policy.apex.context.test.concepts.TestContextItem008;
-import org.onap.policy.apex.context.test.concepts.TestContextItem00A;
-import org.onap.policy.apex.context.test.concepts.TestContextItem00C;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextTreeMapItem;
 import org.onap.policy.apex.context.test.factory.TestContextAlbumFactory;
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -61,7 +61,8 @@
  */
 public class TestPersistentContextInstantiation {
     // Logger for this class
-    // private static final XLogger logger = XLoggerFactory.getXLogger(TestPersistentContextInstantiation.class);
+    // private static final XLogger logger =
+    // XLoggerFactory.getXLogger(TestPersistentContextInstantiation.class);
 
     private Connection connection;
 
@@ -89,8 +90,8 @@
         final AxArtifactKey distributorKey = new AxArtifactKey("AbstractDistributor", "0.0.1");
         final Distributor contextDistributor = new DistributorFactory().getDistributor(distributorKey);
 
-        final AxArtifactKey[] usedArtifactStackArray = { new AxArtifactKey("testC-top", "0.0.1"),
-                new AxArtifactKey("testC-next", "0.0.1"), new AxArtifactKey("testC-bot", "0.0.1") };
+        final AxArtifactKey[] usedArtifactStackArray = {new AxArtifactKey("testC-top", "0.0.1"),
+                new AxArtifactKey("testC-next", "0.0.1"), new AxArtifactKey("testC-bot", "0.0.1")};
 
         final DAOParameters daoParameters = new DAOParameters();
         daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
@@ -113,11 +114,11 @@
         testMap.put("key", "This is a policy context string");
 
         final Map<String, Object> valueMap0 = new HashMap<String, Object>();
-        valueMap0.put("TestPolicyContextItem000", new TestContextItem00C(testMap));
+        valueMap0.put("TestPolicyContextItem000", new TestContextTreeMapItem(testMap));
 
         contextAlbumForMap.putAll(valueMap0);
 
-        assertEquals(((TestContextItem00C) contextAlbumForMap.get("TestPolicyContextItem000")).getMapValue().get("key"),
+        assertEquals(((TestContextTreeMapItem) contextAlbumForMap.get("TestPolicyContextItem000")).getMapValue().get("key"),
                 "This is a policy context string");
 
         contextAlbumForMap.flush();
@@ -131,8 +132,8 @@
         assertNotNull(contextAlbumForDate);
         contextAlbumForDate.setUserArtifactStack(usedArtifactStackArray);
 
-        final TestContextItem008 testDate = new TestContextItem008(new Date());
-        final TestContextItem00A tci00A = new TestContextItem00A();
+        final TestContextDateItem testDate = new TestContextDateItem(new Date());
+        final TestContextDateLocaleItem tci00A = new TestContextDateLocaleItem();
         tci00A.setDateValue(testDate);
         tci00A.setTZValue(TimeZone.getTimeZone("Europe/Dublin").toString());
         tci00A.setDST(true);
@@ -142,9 +143,9 @@
 
         contextAlbumForDate.putAll(valueMap1);
 
-        assertEquals(((TestContextItem00A) contextAlbumForDate.get("TestPolicyContextItem00A")).getDateValue(),
+        assertEquals(((TestContextDateLocaleItem) contextAlbumForDate.get("TestPolicyContextItem00A")).getDateValue(),
                 testDate);
-        assertEquals(((TestContextItem00A) contextAlbumForDate.get("TestPolicyContextItem00A")).getDST(), true);
+        assertEquals(((TestContextDateLocaleItem) contextAlbumForDate.get("TestPolicyContextItem00A")).getDST(), true);
 
         contextAlbumForDate.flush();
 
@@ -158,23 +159,23 @@
         contextAlbumForLong.setUserArtifactStack(usedArtifactStackArray);
 
         final Map<String, Object> valueMap2 = new HashMap<String, Object>();
-        valueMap2.put("TestPolicyContextItem0031", new TestContextItem003(0xFFFFFFFFFFFFFFFFL));
-        valueMap2.put("TestPolicyContextItem0032", new TestContextItem003(0xFFFFFFFFFFFFFFFEL));
-        valueMap2.put("TestPolicyContextItem0033", new TestContextItem003(0xFFFFFFFFFFFFFFFDL));
-        valueMap2.put("TestPolicyContextItem0034", new TestContextItem003(0xFFFFFFFFFFFFFFFCL));
-        valueMap2.put("TestPolicyContextItem0035", new TestContextItem003(0xFFFFFFFFFFFFFFFBL));
+        valueMap2.put("TestPolicyContextItem0031", new TestContextLongItem(0xFFFFFFFFFFFFFFFFL));
+        valueMap2.put("TestPolicyContextItem0032", new TestContextLongItem(0xFFFFFFFFFFFFFFFEL));
+        valueMap2.put("TestPolicyContextItem0033", new TestContextLongItem(0xFFFFFFFFFFFFFFFDL));
+        valueMap2.put("TestPolicyContextItem0034", new TestContextLongItem(0xFFFFFFFFFFFFFFFCL));
+        valueMap2.put("TestPolicyContextItem0035", new TestContextLongItem(0xFFFFFFFFFFFFFFFBL));
 
         contextAlbumForLong.putAll(valueMap2);
 
-        assertEquals(((TestContextItem003) contextAlbumForLong.get("TestPolicyContextItem0031")).getLongValue(),
+        assertEquals(((TestContextLongItem) contextAlbumForLong.get("TestPolicyContextItem0031")).getLongValue(),
                 0xFFFFFFFFFFFFFFFFL);
-        assertEquals(((TestContextItem003) contextAlbumForLong.get("TestPolicyContextItem0032")).getLongValue(),
+        assertEquals(((TestContextLongItem) contextAlbumForLong.get("TestPolicyContextItem0032")).getLongValue(),
                 0xFFFFFFFFFFFFFFFEL);
-        assertEquals(((TestContextItem003) contextAlbumForLong.get("TestPolicyContextItem0033")).getLongValue(),
+        assertEquals(((TestContextLongItem) contextAlbumForLong.get("TestPolicyContextItem0033")).getLongValue(),
                 0xFFFFFFFFFFFFFFFDL);
-        assertEquals(((TestContextItem003) contextAlbumForLong.get("TestPolicyContextItem0034")).getLongValue(),
+        assertEquals(((TestContextLongItem) contextAlbumForLong.get("TestPolicyContextItem0034")).getLongValue(),
                 0xFFFFFFFFFFFFFFFCL);
-        assertEquals(((TestContextItem003) contextAlbumForLong.get("TestPolicyContextItem0035")).getLongValue(),
+        assertEquals(((TestContextLongItem) contextAlbumForLong.get("TestPolicyContextItem0035")).getLongValue(),
                 0xFFFFFFFFFFFFFFFBL);
 
         contextAlbumForLong.flush();
diff --git a/context/context-test/src/test/resources/META-INF/persistence.xml b/context/context-test-utils/src/test/resources/META-INF/persistence.xml
similarity index 100%
rename from context/context-test/src/test/resources/META-INF/persistence.xml
rename to context/context-test-utils/src/test/resources/META-INF/persistence.xml
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/ContextInstantiation.java b/context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/ContextInstantiation.java
deleted file mode 100644
index 4b47c63..0000000
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/ContextInstantiation.java
+++ /dev/null
@@ -1,469 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed 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.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.apex.context.test.distribution;
-
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.TimeZone;
-import java.util.TreeSet;
-
-import org.onap.policy.apex.context.ContextAlbum;
-import org.onap.policy.apex.context.ContextException;
-import org.onap.policy.apex.context.ContextRuntimeException;
-import org.onap.policy.apex.context.Distributor;
-import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
-import org.onap.policy.apex.context.test.concepts.TestContextItem000;
-import org.onap.policy.apex.context.test.concepts.TestContextItem001;
-import org.onap.policy.apex.context.test.concepts.TestContextItem002;
-import org.onap.policy.apex.context.test.concepts.TestContextItem003;
-import org.onap.policy.apex.context.test.concepts.TestContextItem004;
-import org.onap.policy.apex.context.test.concepts.TestContextItem005;
-import org.onap.policy.apex.context.test.concepts.TestContextItem006;
-import org.onap.policy.apex.context.test.concepts.TestContextItem007;
-import org.onap.policy.apex.context.test.concepts.TestContextItem008;
-import org.onap.policy.apex.context.test.concepts.TestContextItem009;
-import org.onap.policy.apex.context.test.concepts.TestContextItem00A;
-import org.onap.policy.apex.context.test.concepts.TestContextItem00B;
-import org.onap.policy.apex.context.test.concepts.TestContextItem00C;
-import org.onap.policy.apex.context.test.concepts.TestExternalContextItem;
-import org.onap.policy.apex.context.test.concepts.TestGlobalContextItem;
-import org.onap.policy.apex.context.test.concepts.TestPolicyContextItem;
-import org.onap.policy.apex.context.test.factory.TestContextAlbumFactory;
-import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
-/**
- * The Class TestContextInstantiation is used to test Apex context insitiation is correct.
- *
- * @author Sergey Sachkov (sergey.sachkov@ericsson.com)
- */
-public class ContextInstantiation {
-    // Logger for this class
-    private static final XLogger LOGGER = XLoggerFactory.getXLogger(ContextInstantiation.class);
-
-    /**
-     * Test context instantiation.
-     *
-     * @throws ContextException the context exception
-     */
-    // CHECKSTYLE:OFF: checkstyle:MaximumMethodLength
-    public void testContextInstantiation() throws ContextException {
-        // CHECKSTYLE:ON: checkstyle:MaximumMethodLength
-        LOGGER.debug("Running TestContextInstantiation test . . .");
-
-        final AxArtifactKey distributorKey = new AxArtifactKey("ApexDistributorInit", "0.0.1");
-        Distributor contextDistributor = null;
-        try {
-            contextDistributor = new DistributorFactory().getDistributor(distributorKey);
-        } catch (final Exception exception) {
-            LOGGER.error("Error occured while Instantiating Distributor for : {}", distributorKey, exception);
-            return;
-        }
-
-        // @formatter:off
-        final AxArtifactKey[] usedArtifactStackArray = {
-                new AxArtifactKey("testC-top", "0.0.1"), new AxArtifactKey("testC-next", "0.0.1"),
-                new AxArtifactKey("testC-bot", "0.0.1")
-        };
-        // @formatter:on
-
-        try {
-            // CHECKSTYLE:OFF: checkstyle:magicNumber
-            final AxContextModel policyContextModel = TestContextAlbumFactory.createPolicyContextModel();
-            final AxValidationResult result = new AxValidationResult();
-            policyContextModel.validate(result);
-            LOGGER.debug(result.toString());
-            assert (result.isValid());
-
-            contextDistributor.registerModel(policyContextModel);
-
-            final ContextAlbum policyContextAlbum =
-                    contextDistributor.createContextAlbum(new AxArtifactKey("PolicyContextAlbum", "0.0.1"));
-            assert (policyContextAlbum != null);
-            policyContextAlbum.setUserArtifactStack(usedArtifactStackArray);
-
-            final Float testFloat = new Float(3.14159265359);
-            final Date testDate = new Date();
-
-            final TestContextItem009 tci9 = new TestContextItem009();
-            tci9.setDateValue(new TestContextItem008(testDate));
-            tci9.setTZValue(TimeZone.getTimeZone("Europe/Dublin").getDisplayName());
-            tci9.setDST(true);
-
-            final TestContextItem00A tciA = new TestContextItem00A();
-            tciA.setDateValue(new TestContextItem008(testDate));
-            tciA.setTZValue(TimeZone.getTimeZone("Europe/Dublin").getDisplayName());
-            tciA.setDST(true);
-            tciA.setUTCOffset(-600);
-            tciA.setLocale(Locale.ENGLISH);
-
-            final TreeSet<String> testTreeSet = new TreeSet<>();
-            testTreeSet.add("one hundred");
-            testTreeSet.add("one hundred and one");
-            testTreeSet.add("one hundred and two");
-            testTreeSet.add("one hundred and three");
-            testTreeSet.add("one hundred and four");
-
-            final Map<String, String> testHashMap = new HashMap<>();
-            testHashMap.put("0", "zero");
-            testHashMap.put("1", "one");
-            testHashMap.put("2", "two");
-            testHashMap.put("3", "three");
-            testHashMap.put("4", "four");
-
-            final TestContextItem006 testPolicyContextItem000 =
-                    new TestContextItem006("This is a policy context string");
-            final TestContextItem003 testPolicyContextItem001 = new TestContextItem003(0xFFFFFFFFFFFFFFFFL);
-            final TestContextItem005 testPolicyContextItem002 = new TestContextItem005(Math.PI);
-            final TestContextItem000 testPolicyContextItem003 = new TestContextItem000(true);
-            final TestContextItem003 testPolicyContextItem004 = new TestContextItem003(testDate.getTime());
-            final TestContextItem00C testPolicyContextItem005 = new TestContextItem00C(testHashMap);
-
-            final Map<String, Object> valueMapA = new LinkedHashMap<>();
-            valueMapA.put("TestPolicyContextItem001", testPolicyContextItem001);
-            valueMapA.put("TestPolicyContextItem002", testPolicyContextItem002);
-            valueMapA.put("TestPolicyContextItem003", testPolicyContextItem003);
-            valueMapA.put("TestPolicyContextItem004", testPolicyContextItem004);
-            valueMapA.put("TestPolicyContextItem005", testPolicyContextItem005);
-            valueMapA.put("TestPolicyContextItem000", testPolicyContextItem000);
-
-            try {
-                policyContextAlbum.put("TestPolicyContextItem000", testPolicyContextItem000);
-                assert ("Test should throw an exception".equals(""));
-            } catch (final ContextRuntimeException e) {
-                assert (e.getMessage()
-                        .equals("Failed to set context value for key \"TestPolicyContextItem000\" in album \"PolicyContextAlbum:0.0.1\": "
-                                + "PolicyContextAlbum:0.0.1: object \"TestContextItem006 [stringValue=This is a policy context string]\" "
-                                + "of class \"org.onap.policy.apex.context.test.concepts.TestContextItem006\""
-                                + " not compatible with class \"org.onap.policy.apex.context.test.concepts.TestPolicyContextItem\""));
-            }
-
-            try {
-                policyContextAlbum.putAll(valueMapA);
-                assert ("Test should throw an exception".equals(""));
-            } catch (final ContextRuntimeException e) {
-                assert (e.getMessage()
-                        .equals("Failed to set context value for key \"TestPolicyContextItem001\" in album \"PolicyContextAlbum:0.0.1\": "
-                                + "PolicyContextAlbum:0.0.1: object \"TestContextItem003 [longValue=-1]\" "
-                                + "of class \"org.onap.policy.apex.context.test.concepts.TestContextItem003\""
-                                + " not compatible with class \"org.onap.policy.apex.context.test.concepts.TestPolicyContextItem\""));
-            }
-
-            final TestPolicyContextItem policyContext = new TestPolicyContextItem();
-
-            LOGGER.debug(policyContextAlbum.toString());
-
-            policyContext.setTestPolicyContextItem000(testPolicyContextItem000);
-            policyContext.setTestPolicyContextItem001(testPolicyContextItem001);
-            policyContext.setTestPolicyContextItem002(testPolicyContextItem002);
-            policyContext.setTestPolicyContextItem003(testPolicyContextItem003);
-            policyContext.setTestPolicyContextItem004(testPolicyContextItem004);
-            policyContext.setTestPolicyContextItem005(testPolicyContextItem005);
-
-            final Map<String, Object> valueMap0 = new HashMap<>();
-            valueMap0.put("TestPolicyContextItem", policyContext);
-
-            policyContextAlbum.putAll(valueMap0);
-
-            final TestPolicyContextItem contextItem =
-                    (TestPolicyContextItem) policyContextAlbum.get("TestPolicyContextItem");
-            assert (contextItem.getTestPolicyContextItem000().getStringValue()
-                    .equals("This is a policy context string"));
-            assert (contextItem.getTestPolicyContextItem001().getLongValue() == 0xFFFFFFFFFFFFFFFFL);
-            assert (Double.compare(contextItem.getTestPolicyContextItem002().getDoubleValue(), Math.PI) == 0);
-            assert (contextItem.getTestPolicyContextItem003().getFlag());
-            assert (contextItem.getTestPolicyContextItem004().getLongValue() == testDate.getTime());
-            assert (contextItem.getTestPolicyContextItem005().getMapValue().equals(testHashMap));
-
-            final AxContextModel globalContextModel = TestContextAlbumFactory.createGlobalContextModel();
-
-            final TestContextItem000 testGlobalContextItem000 = new TestContextItem000(false);
-            final TestContextItem001 testGlobalContextItem001 = new TestContextItem001((byte) 0xFF);
-            final TestContextItem002 testGlobalContextItem002 = new TestContextItem002(0xFFFFFFFF);
-            final TestContextItem003 testGlobalContextItem003 = new TestContextItem003(0xFFFFFFFFFFFFFFFFL);
-            final TestContextItem004 testGlobalContextItem004 = new TestContextItem004(testFloat);
-            final TestContextItem005 testGlobalContextItem005 = new TestContextItem005(Math.PI);
-            final TestContextItem006 testGlobalContextItem006 =
-                    new TestContextItem006("This is a global context string");
-            final TestContextItem007 testGlobalContextItem007 = new TestContextItem007(testDate.getTime());
-            final TestContextItem008 testGlobalContextItem008 = new TestContextItem008(testDate);
-            final TestContextItem00B testGlobalContextItem00B = new TestContextItem00B(testTreeSet);
-            final TestContextItem00C testGlobalContextItem00C = new TestContextItem00C(testHashMap);
-
-            final TestGlobalContextItem globalContext = new TestGlobalContextItem();
-
-            globalContext.setTestGlobalContextItem000(testGlobalContextItem000);
-            globalContext.setTestGlobalContextItem001(testGlobalContextItem001);
-            globalContext.setTestGlobalContextItem002(testGlobalContextItem002);
-            globalContext.setTestGlobalContextItem003(testGlobalContextItem003);
-            globalContext.setTestGlobalContextItem004(testGlobalContextItem004);
-            globalContext.setTestGlobalContextItem005(testGlobalContextItem005);
-            globalContext.setTestGlobalContextItem006(testGlobalContextItem006);
-            globalContext.setTestGlobalContextItem007(testGlobalContextItem007);
-            globalContext.setTestGlobalContextItem008(testGlobalContextItem008);
-            globalContext.setTestGlobalContextItem009(tci9);
-            globalContext.setTestGlobalContextItem00A(tciA);
-            globalContext.setTestGlobalContextItem00B(testGlobalContextItem00B);
-            globalContext.setTestGlobalContextItem00C(testGlobalContextItem00C);
-            final Map<String, Object> valueMap1 = new HashMap<>();
-            valueMap1.put("globalContext", globalContext);
-
-            try {
-                contextDistributor.registerModel(globalContextModel);
-            } catch (final ContextException e) {
-                assert (e.getMessage().equals(
-                        "active context albums found in distributor, clear the distributor before registering models"));
-            }
-
-            contextDistributor.registerModel(globalContextModel);
-
-            final ContextAlbum globalContextAlbum =
-                    contextDistributor.createContextAlbum(new AxArtifactKey("GlobalContextAlbum", "0.0.1"));
-            assert (globalContextAlbum != null);
-            globalContextAlbum.setUserArtifactStack(usedArtifactStackArray);
-
-            globalContextAlbum.putAll(valueMap1);
-
-            final TestGlobalContextItem globalContextItem =
-                    (TestGlobalContextItem) globalContextAlbum.get("globalContext");
-            assert (!globalContextItem.getTestGlobalContextItem000().getFlag());
-            assert (globalContextItem.getTestGlobalContextItem001().getByteValue() == (byte) 0xFF);
-            assert (globalContextItem.getTestGlobalContextItem002().getIntValue() == 0xFFFFFFFF);
-            assert (globalContextItem.getTestGlobalContextItem003().getLongValue() == 0xFFFFFFFFFFFFFFFFL);
-            assert (Float.compare(globalContextItem.getTestGlobalContextItem004().getFloatValue(), testFloat) == 0);
-            assert (Double.compare(globalContextItem.getTestGlobalContextItem005().getDoubleValue(), Math.PI) == 0);
-            assert (globalContextItem.getTestGlobalContextItem006().getStringValue()
-                    .equals("This is a global context string"));
-            assert (globalContextItem.getTestGlobalContextItem007().getLongValue() == testDate.getTime());
-            assert (globalContextItem.getTestGlobalContextItem008().getDateValue().equals(testDate));
-            assert (globalContextItem.getTestGlobalContextItem009().getDateValue().getTime() == tci9.getDateValue()
-                    .getTime());
-            assert (globalContextItem.getTestGlobalContextItem00A().getDateValue().getTime() == tciA.getDateValue()
-                    .getTime());
-            assert (globalContextItem.getTestGlobalContextItem00B().getSetValue().equals(testTreeSet));
-            assert (globalContextItem.getTestGlobalContextItem00C().getMapValue().equals(testHashMap));
-
-            final AxContextModel externalContextModel = TestContextAlbumFactory.createExternalContextModel();
-
-            final TestExternalContextItem externalContext = new TestExternalContextItem();
-
-            final TestContextItem000 testExternalContextItem000 = new TestContextItem000(false);
-            final TestContextItem001 testExternalContextItem001 = new TestContextItem001((byte) 0xFF);
-            final TestContextItem002 testExternalContextItem002 = new TestContextItem002(0xFFFFFFFF);
-            final TestContextItem003 testExternalContextItem003 = new TestContextItem003(0xFFFFFFFFFFFFFFFFL);
-            final TestContextItem004 testExternalContextItem004 = new TestContextItem004(testFloat);
-            final TestContextItem005 testExternalContextItem005 = new TestContextItem005(Math.PI);
-            final TestContextItem006 testExternalContextItem006 =
-                    new TestContextItem006("This is an external context string");
-            final TestContextItem007 testExternalContextItem007 = new TestContextItem007(testDate.getTime());
-            final TestContextItem008 testExternalContextItem008 = new TestContextItem008(testDate);
-            final TestContextItem00B testExternalContextItem00B = new TestContextItem00B(testTreeSet);
-            final TestContextItem00C testExternalContextItem00C = new TestContextItem00C(testHashMap);
-
-            final TestContextItem009 tci9A = new TestContextItem009(tci9);
-            final TestContextItem00A tciAA = new TestContextItem00A(tciA);
-
-            externalContext.setTestExternalContextItem000(testExternalContextItem000);
-            externalContext.setTestExternalContextItem001(testExternalContextItem001);
-            externalContext.setTestExternalContextItem002(testExternalContextItem002);
-            externalContext.setTestExternalContextItem003(testExternalContextItem003);
-            externalContext.setTestExternalContextItem004(testExternalContextItem004);
-            externalContext.setTestExternalContextItem005(testExternalContextItem005);
-            externalContext.setTestExternalContextItem006(testExternalContextItem006);
-            externalContext.setTestExternalContextItem007(testExternalContextItem007);
-            externalContext.setTestExternalContextItem008(testExternalContextItem008);
-            externalContext.setTestExternalContextItem009(tci9A);
-            externalContext.setTestExternalContextItem00A(tciAA);
-            externalContext.setTestExternalContextItem00B(testExternalContextItem00B);
-            externalContext.setTestExternalContextItem00C(testExternalContextItem00C);
-
-            final Map<String, Object> valueMap2 = new HashMap<>();
-            valueMap2.put("externalContext", externalContext);
-
-            contextDistributor.clear();
-            contextDistributor.init(new AxArtifactKey("ClearedandInittedDistributor", "0.0.1"));
-            contextDistributor.registerModel(externalContextModel);
-
-            final ContextAlbum externalContextAlbum =
-                    contextDistributor.createContextAlbum(new AxArtifactKey("ExternalContextAlbum", "0.0.1"));
-            assert (externalContextAlbum != null);
-            externalContextAlbum.setUserArtifactStack(usedArtifactStackArray);
-
-            externalContextAlbum.putAll(valueMap2);
-            externalContextAlbum.getAlbumDefinition().setWritable(false);
-
-            final TestExternalContextItem externalContextItem =
-                    (TestExternalContextItem) externalContextAlbum.get("externalContext");
-
-            assert (!externalContextItem.getTestExternalContextItem000().getFlag());
-            assert (externalContextItem.getTestExternalContextItem001().getByteValue() == (byte) 0xFF);
-            assert (externalContextItem.getTestExternalContextItem002().getIntValue() == 0xFFFFFFFF);
-            assert (externalContextItem.getTestExternalContextItem003().getLongValue() == 0xFFFFFFFFFFFFFFFFL);
-            assert (Float.compare(externalContextItem.getTestExternalContextItem004().getFloatValue(), testFloat) == 0);
-            assert (Double.compare(externalContextItem.getTestExternalContextItem005().getDoubleValue(), Math.PI) == 0);
-            assert (externalContextItem.getTestExternalContextItem006().getStringValue()
-                    .equals("This is an external context string"));
-            assert (externalContextItem.getTestExternalContextItem007().getLongValue() == testDate.getTime());
-            assert (externalContextItem.getTestExternalContextItem008().getDateValue().equals(testDate));
-            assert (externalContextItem.getTestExternalContextItem009().getDateValue().getTime() == tci9A.getDateValue()
-                    .getTime());
-            assert (externalContextItem.getTestExternalContextItem00A().getDateValue().getTime() == tciAA.getDateValue()
-                    .getTime());
-            assert (externalContextItem.getTestExternalContextItem00B().getSetValue().equals(testTreeSet));
-            assert (externalContextItem.getTestExternalContextItem00C().getMapValue().equals(testHashMap));
-
-            final Collection<Object> mapValues = externalContextAlbum.values();
-            assert (externalContextAlbum.values().containsAll(mapValues));
-
-            // Check that clearing does not work
-            try {
-                externalContextAlbum.clear();
-                assert ("Test should throw an exception".equals(""));
-            } catch (final ContextRuntimeException e) {
-                assert (e.getMessage()
-                        .equals("album \"ExternalContextAlbum:0.0.1\" clear() not allowed on read only albums"));
-            }
-
-            assert (externalContextAlbum.size() == 1);
-
-            try {
-                externalContextAlbum.containsKey(null);
-            } catch (final ContextRuntimeException e) {
-                assert (e.getMessage().equals("null values are illegal on method parameter \"key\""));
-            }
-
-            assert (externalContextAlbum.containsKey("externalContext"));
-            assert (!externalContextAlbum.containsKey("globalContext"));
-
-            try {
-                externalContextAlbum.containsValue(null);
-            } catch (final ContextRuntimeException e) {
-                assert (e.getMessage().equals("null values are illegal on method parameter \"value\""));
-            }
-
-            assert (externalContextAlbum.containsValue(externalContext));
-            assert (!externalContextAlbum.containsValue(new String("Hello")));
-
-            final Set<Entry<String, Object>> entrySet = externalContextAlbum.entrySet();
-            assert (entrySet.size() == 1);
-
-            try {
-                externalContextAlbum.get(null);
-            } catch (final ContextRuntimeException e) {
-                assert (e.getMessage()
-                        .equals("album \"ExternalContextAlbum:0.0.1\" null keys are illegal on keys for get()"));
-            }
-
-            final Object aObject = externalContextAlbum.get("externalContext");
-            assert (aObject.equals(externalContext));
-
-            // put null keys should fail, throws a runtime exception
-            try {
-                externalContextAlbum.put(null, null);
-            } catch (final ContextRuntimeException e) {
-                assert (e.getMessage()
-                        .equals("album \"ExternalContextAlbum:0.0.1\" null keys are illegal on keys for put()"));
-            }
-
-            try {
-                externalContextAlbum.put("TestExternalContextItem00A", null);
-            } catch (final ContextRuntimeException e) {
-                assert (e.getMessage().equals(
-                        "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItem00A\" for put()"));
-            }
-            assert (externalContextItem.getTestExternalContextItem00A().equals(tciAA));
-
-            // Should return the hash set
-            assert (externalContextItem.getTestExternalContextItem00B().getSetValue().equals(testTreeSet));
-
-            assert (externalContextAlbum.values().containsAll(mapValues));
-
-            // Set the write flag back as it should be
-            externalContextAlbum.getAlbumDefinition().setWritable(true);
-
-            // Put should return the previous contextItem
-            final TestExternalContextItem externalContextOther = new TestExternalContextItem();
-            externalContextOther.setTestExternalContextItem002(new TestContextItem002());
-            externalContextOther.getTestExternalContextItem002().setIntValue(2000);
-
-            final Object object = externalContextAlbum.put("externalContext", externalContextOther);
-            assert (object.equals(externalContext));
-
-            final TestExternalContextItem item = (TestExternalContextItem) externalContextAlbum.get("externalContext");
-            assert (item.getTestExternalContextItem002().getIntValue() == 2000);
-            final Object actualExternalContext = externalContextAlbum.put("externalContext", externalContext);
-            assert (actualExternalContext.equals(externalContextOther));
-            assert (externalContextItem.getTestExternalContextItem002().getIntValue() == -1);
-
-            try {
-                externalContextAlbum.put("TestExternalContextItem00A", null);
-            } catch (final ContextRuntimeException e) {
-                assert (e.getMessage().equals(
-                        "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItem00A\" for put()"));
-            }
-            assert (externalContextAlbum.get("externalContext").equals(externalContext));
-
-            try {
-                externalContextAlbum.put("TestExternalContextItemFFF", null);
-            } catch (final ContextRuntimeException e) {
-                assert (e.getMessage().equals(
-                        "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItemFFF\" for put()"));
-            }
-            assert (externalContextAlbum.size() == 1);
-
-            try {
-                externalContextAlbum.put("TestExternalContextItemFFF", null);
-            } catch (final ContextRuntimeException e) {
-                assert (e.getMessage().equals(
-                        "album \"ExternalContextAlbum:0.0.1\" null values are illegal on key \"TestExternalContextItemFFF\" for put()"));
-            }
-            assert (externalContextAlbum.size() == 1);
-
-            // Should ignore remove
-            externalContextAlbum.remove("TestExternalContextItem017");
-            assert (externalContextAlbum.size() == 1);
-
-            assert (externalContextAlbum.values().size() == 1);
-            assert (externalContextAlbum.values().containsAll(mapValues));
-            // CHECKSTYLE:ON: checkstyle:magicNumber
-        } catch (final Exception exception) {
-            LOGGER.error("Error: ", exception);
-            contextDistributor.clear();
-            assert ("Test has failed".equals(""));
-        }
-
-        try {
-            contextDistributor.clear();
-        } catch (final Exception exception) {
-            LOGGER.error("Error occured while clearing context distributor: ", exception);
-            assert ("Test has failed".equals(""));
-        }
-    }
-}
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/ContextUpdate.java b/context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/ContextUpdate.java
deleted file mode 100644
index d104900..0000000
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/ContextUpdate.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed 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.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.apex.context.test.distribution;
-
-import java.io.IOException;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.TimeZone;
-
-import org.onap.policy.apex.context.ContextAlbum;
-import org.onap.policy.apex.context.ContextRuntimeException;
-import org.onap.policy.apex.context.Distributor;
-import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
-import org.onap.policy.apex.context.test.concepts.TestContextItem008;
-import org.onap.policy.apex.context.test.concepts.TestContextItem00A;
-import org.onap.policy.apex.context.test.concepts.TestContextItem00C;
-import org.onap.policy.apex.context.test.factory.TestContextAlbumFactory;
-import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
-import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
-import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
-/**
- * The Class TestContextUpdate checks context updates.
- *
- * @author Sergey Sachkov (sergey.sachkov@ericsson.com)
- */
-public class ContextUpdate {
-    // Logger for this class
-    private static final XLogger LOGGER = XLoggerFactory.getXLogger(ContextUpdate.class);
-
-    /**
-     * Test context update.
-     *
-     * @throws ApexModelException the apex model exception
-     * @throws IOException the IO exception
-     * @throws ApexException the apex exception
-     */
-    public void testContextUpdate() throws ApexModelException, IOException, ApexException {
-        LOGGER.debug("Running TestContextUpdate test . . .");
-
-        final AxArtifactKey distributorKey = new AxArtifactKey("ApexDistributor", "0.0.1");
-        final Distributor contextDistributor = new DistributorFactory().getDistributor(distributorKey);
-
-        // @formatter:off
-        final AxArtifactKey[] usedArtifactStackArray = {
-                new AxArtifactKey("testC-top", "0.0.1"),
-                new AxArtifactKey("testC-next", "0.0.1"),
-                new AxArtifactKey("testC-bot", "0.0.1")
-        };
-        // @formatter:on
-
-        // CHECKSTYLE:OFF: checkstyle:magicNumber
-
-        final AxContextModel multiModel = TestContextAlbumFactory.createMultiAlbumsContextModel();
-        contextDistributor.registerModel(multiModel);
-
-        final ContextAlbum longContextAlbum =
-                contextDistributor.createContextAlbum(new AxArtifactKey("LongContextAlbum", "0.0.1"));
-        assert (longContextAlbum != null);
-        longContextAlbum.setUserArtifactStack(usedArtifactStackArray);
-
-        final ContextAlbum dateContextAlbum =
-                contextDistributor.createContextAlbum(new AxArtifactKey("DateContextAlbum", "0.0.1"));
-        assert (dateContextAlbum != null);
-        longContextAlbum.setUserArtifactStack(usedArtifactStackArray);
-
-        final ContextAlbum mapContextAlbum =
-                contextDistributor.createContextAlbum(new AxArtifactKey("MapContextAlbum", "0.0.1"));
-        assert (mapContextAlbum != null);
-        mapContextAlbum.setUserArtifactStack(usedArtifactStackArray);
-
-        final TestContextItem00A tciA = new TestContextItem00A();
-        tciA.setDateValue(new TestContextItem008(new Date()));
-        tciA.setTZValue(TimeZone.getTimeZone("Europe/Dublin").getDisplayName());
-        tciA.setDST(true);
-        tciA.setUTCOffset(-600);
-        tciA.setLocale(Locale.ENGLISH);
-
-        final Map<String, String> testHashMap = new HashMap<>();
-        testHashMap.put("0", "zero");
-        testHashMap.put("1", "one");
-        testHashMap.put("2", "two");
-        testHashMap.put("3", "three");
-        testHashMap.put("4", "four");
-
-        final TestContextItem00C tciC = new TestContextItem00C(testHashMap);
-
-        longContextAlbum.put("0", (long) 0);
-        longContextAlbum.put("0", 0);
-        longContextAlbum.put("0", "0");
-
-        try {
-            longContextAlbum.put("0", "zero");
-            assert ("Test should throw an exception".equals(""));
-        } catch (final ContextRuntimeException e) {
-            assert (e.getMessage().equals(
-                    "Failed to set context value for key \"0\" in album \"LongContextAlbum:0.0.1\": LongContextAlbum:0.0.1: object \"zero\" of class \"java.lang.String\" not compatible with class \"java.lang.Long\""));
-        }
-
-        try {
-            longContextAlbum.put("0", "");
-            assert ("Test should throw an exception".equals(""));
-        } catch (final ContextRuntimeException e) {
-            assert (e.getMessage().equals(
-                    "Failed to set context value for key \"0\" in album \"LongContextAlbum:0.0.1\": LongContextAlbum:0.0.1: object \"\" of class \"java.lang.String\" not compatible with class \"java.lang.Long\""));
-        }
-
-        try {
-            longContextAlbum.put("0", null);
-            assert ("Test should throw an exception".equals(""));
-        } catch (final ContextRuntimeException e) {
-            assert (e.getMessage()
-                    .equals("album \"LongContextAlbum:0.0.1\" null values are illegal on key \"0\" for put()"));
-        }
-
-        try {
-            longContextAlbum.put(null, null);
-            assert ("Test should throw an exception".equals(""));
-        } catch (final ContextRuntimeException e) {
-            assert (e.getMessage().equals("album \"LongContextAlbum:0.0.1\" null keys are illegal on keys for put()"));
-        }
-
-        Object object = dateContextAlbum.put("date0", tciA);
-        assert (object == null);
-        object = dateContextAlbum.put("date0", tciA);
-        assert (object.equals(tciA));
-
-        object = mapContextAlbum.put("map0", tciC);
-        assert (object == null);
-        object = mapContextAlbum.put("map0", tciC);
-        assert (object.equals(tciC));
-
-        contextDistributor.clear();
-        // CHECKSTYLE:ON: checkstyle:magicNumber
-    }
-}
diff --git a/context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/SequentialContextInstantiation.java b/context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/SequentialContextInstantiation.java
deleted file mode 100644
index e22321c..0000000
--- a/context/context-test/src/main/java/org/onap/policy/apex/context/test/distribution/SequentialContextInstantiation.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed 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.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.apex.context.test.distribution;
-
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.TimeZone;
-
-import org.onap.policy.apex.context.ContextAlbum;
-import org.onap.policy.apex.context.ContextException;
-import org.onap.policy.apex.context.Distributor;
-import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
-import org.onap.policy.apex.context.test.concepts.TestContextItem000;
-import org.onap.policy.apex.context.test.concepts.TestContextItem001;
-import org.onap.policy.apex.context.test.concepts.TestContextItem002;
-import org.onap.policy.apex.context.test.concepts.TestContextItem003;
-import org.onap.policy.apex.context.test.concepts.TestContextItem004;
-import org.onap.policy.apex.context.test.concepts.TestContextItem005;
-import org.onap.policy.apex.context.test.concepts.TestContextItem006;
-import org.onap.policy.apex.context.test.concepts.TestContextItem007;
-import org.onap.policy.apex.context.test.concepts.TestContextItem008;
-import org.onap.policy.apex.context.test.concepts.TestContextItem009;
-import org.onap.policy.apex.context.test.concepts.TestContextItem00A;
-import org.onap.policy.apex.context.test.factory.TestContextAlbumFactory;
-import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
-/**
- * The Class SequentialContextInstantiation checks sequential initiation of context.
- *
- * @author Sergey Sachkov (sergey.sachkov@ericsson.com)
- */
-public class SequentialContextInstantiation {
-    // Logger for this class
-    private static final XLogger LOGGER = XLoggerFactory.getXLogger(SequentialContextInstantiation.class);
-
-    /**
-     * Test sequential context instantiation.
-     *
-     * @throws ContextException the context exception
-     */
-    // CHECKSTYLE:OFF: checkstyle:MaximumMethodLength
-    public void testSequentialContextInstantiation() throws ContextException {
-        // CHECKSTYLE:ON: MaximumMethodLength
-        LOGGER.debug("Running TestContextInstantiation test . . .");
-
-        final AxArtifactKey distributorKey = new AxArtifactKey("ApexDistributor", "0.0.1");
-        Distributor contextDistributor = null;
-        try {
-            contextDistributor = new DistributorFactory().getDistributor(distributorKey);
-        } catch (final Exception exception) {
-            LOGGER.error("Error occured while Instantiating Distributor for : {}", distributorKey, exception);
-            assert ("Test has failed".equals(""));
-            return;
-        }
-
-        // @formatter:off
-       final AxArtifactKey[] usedArtifactStackArray = {
-                new AxArtifactKey("testC-top", "0.0.1"),
-                new AxArtifactKey("testC-next", "0.0.1"),
-                new AxArtifactKey("testC-bot", "0.0.1")
-                };
-       // @formatter:on
-
-        try {
-            // CHECKSTYLE:OFF: checkstyle:magicNumber
-            final AxContextModel multiModel = TestContextAlbumFactory.createMultiAlbumsContextModel();
-            contextDistributor.registerModel(multiModel);
-
-            final ContextAlbum dateAlbum =
-                    contextDistributor.createContextAlbum(new AxArtifactKey("DateContextAlbum", "0.0.1"));
-            assert (dateAlbum != null);
-            dateAlbum.setUserArtifactStack(usedArtifactStackArray);
-
-            final Date testDate = new Date();
-
-            final TestContextItem00A tciA00 = new TestContextItem00A();
-            tciA00.setDateValue(new TestContextItem008(new Date()));
-            tciA00.setTZValue(TimeZone.getTimeZone("Europe/Dublin").getDisplayName());
-            tciA00.setDST(true);
-            tciA00.setUTCOffset(-600);
-            tciA00.setLocale(Locale.ENGLISH);
-
-            dateAlbum.put("dv0", tciA00);
-            assert (tciA00.equals(dateAlbum.get("dv0")));
-
-            dateAlbum.put("dv1", tciA00);
-            assert (tciA00.equals(dateAlbum.get("dv1")));
-
-            final TestContextItem009 tci9 = new TestContextItem009();
-            tci9.setDateValue(new TestContextItem008(testDate));
-            tci9.setTZValue(TimeZone.getTimeZone("Europe/Dublin").getDisplayName());
-            tci9.setDST(true);
-
-            try {
-                dateAlbum.put("tci9", tci9);
-            } catch (final Exception e) {
-                assert (e.getMessage().contains(
-                        "class \"org.onap.policy.apex.context.test.concepts.TestContextItem009\" not compatible with class \"org.onap.policy.apex.context.test.concepts.TestContextItem00A\""));
-            }
-
-            final TestContextItem00A tciA01 = new TestContextItem00A(tciA00);
-            final TestContextItem00A tciA02 = new TestContextItem00A(tciA00);
-            final TestContextItem00A tciA03 = new TestContextItem00A(tciA00);
-
-            final Map<String, Object> valueMap0 = new HashMap<>();
-            valueMap0.put("Item01", tciA01);
-            valueMap0.put("Item02", tciA02);
-            valueMap0.put("Item03", tciA03);
-
-            dateAlbum.putAll(valueMap0);
-            assert (dateAlbum.size() == 5);
-            assert (tciA01.equals(dateAlbum.get("Item01")));
-            assert (tciA02.equals(dateAlbum.get("Item02")));
-            assert (tciA03.equals(dateAlbum.get("Item03")));
-
-            final Float testFloat = new Float(3.14159265359);
-
-            final TestContextItem000 testBadItem000 = new TestContextItem000();
-            final TestContextItem001 testBadItem001 = new TestContextItem001();
-            final TestContextItem002 testBadItem002 = new TestContextItem002();
-            final TestContextItem003 testBadItem003 = new TestContextItem003();
-            final TestContextItem004 testBadItem004 = new TestContextItem004();
-            final TestContextItem005 testBadItem005 = new TestContextItem005();
-            final TestContextItem006 testBadItem006 = new TestContextItem006();
-            final TestContextItem007 testBadItem007 = new TestContextItem007();
-            final TestContextItem008 testBadItem008 = new TestContextItem008();
-
-            testBadItem000.setFlag(false);
-            testBadItem001.setByteValue((byte) 0xFF);
-            testBadItem002.setIntValue(0xFFFFFFFF);
-            testBadItem003.setLongValue(0xFFFFFFFFFFFFFFFFL);
-            testBadItem004.setFloatValue(testFloat);
-            testBadItem005.setDoubleValue(Math.PI);
-            testBadItem006.setStringValue("This is a global context string");
-            testBadItem007.setLongValue(testDate.getTime());
-            testBadItem008.setDateValue(testDate);
-
-            final Map<String, Object> valueMap1 = new HashMap<>();
-            valueMap1.put("TestBadItem000", testBadItem000);
-            valueMap1.put("TestBadItem001", testBadItem001);
-            valueMap1.put("TestBadItem002", testBadItem002);
-            valueMap1.put("TestBadItem003", testBadItem003);
-            valueMap1.put("TestBadItem004", testBadItem004);
-            valueMap1.put("TestBadItem005", testBadItem005);
-            valueMap1.put("TestBadItem006", testBadItem006);
-            valueMap1.put("TestBadItem007", testBadItem007);
-            valueMap1.put("TestBadItem008", testBadItem008);
-            valueMap1.put("TestBadItem009", tci9);
-            valueMap1.put("Item00_2", tciA00);
-
-            // Get another reference to the album
-            final ContextAlbum dateAlbum1 =
-                    contextDistributor.createContextAlbum(new AxArtifactKey("DateContextAlbum", "0.0.1"));
-            assert (dateAlbum1 != null);
-            dateAlbum1.setUserArtifactStack(usedArtifactStackArray);
-
-            try {
-                dateAlbum1.putAll(valueMap1);
-            } catch (final Exception e) {
-                assert (e.getMessage().endsWith(
-                        "not compatible with class \"org.onap.policy.apex.context.test.concepts.TestContextItem00A\""));
-            }
-            assert (dateAlbum1.size() == 5);
-
-            valueMap1.clear();
-            valueMap1.put("Item00_2", tciA00);
-            dateAlbum1.putAll(valueMap1);
-            assert (dateAlbum1.size() == 6);
-
-            assert (tciA00.equals(dateAlbum1.get("Item00_2")));
-            dateAlbum.remove("Item00_2");
-            assert (5 == dateAlbum1.size());
-
-            final ContextAlbum dateAlbumCopy =
-                    contextDistributor.createContextAlbum(new AxArtifactKey("DateContextAlbum", "0.0.1"));
-            assert (dateAlbumCopy != null);
-            dateAlbumCopy.setUserArtifactStack(usedArtifactStackArray);
-
-            final Map<String, Object> valueMap2 = new HashMap<>();
-            valueMap2.put("Item04", tciA01);
-            valueMap2.put("Item05", tciA02);
-            valueMap2.put("Item06", tciA03);
-
-            dateAlbumCopy.putAll(valueMap2);
-            assert (8 == dateAlbumCopy.size());
-            assert (tciA03.equals(dateAlbumCopy.get("Item06")));
-
-            final Collection<Object> mapValues = dateAlbum.values();
-            assert (dateAlbumCopy.values().containsAll(mapValues));
-
-            // Check that clearing works
-            dateAlbum1.clear();
-            assert (dateAlbum1.size() == 0);
-
-            dateAlbum.put("Item00", tciA00);
-            final Map<String, Object> valueMap3 = new HashMap<>();
-            valueMap3.put("Item01", tciA01);
-            valueMap3.put("Item02", tciA02);
-            valueMap3.put("Item03", tciA03);
-            dateAlbum.putAll(valueMap3);
-
-            final Map<String, Object> valueMap4 = new HashMap<>();
-            valueMap4.put("Item04", tciA01);
-            valueMap4.put("Item05", tciA02);
-            valueMap4.put("Item06", tciA03);
-
-            dateAlbumCopy.putAll(valueMap4);
-
-            try {
-                dateAlbum.containsKey(null);
-            } catch (final Exception e) {
-                assert (e.getMessage().equals("null values are illegal on method parameter \"key\""));
-            }
-
-            for (final Entry<String, Object> entry : dateAlbum.entrySet()) {
-                System.out.println(entry.getKey() + "->" + entry.getValue());
-            }
-            assert (dateAlbum.containsKey("Item05"));
-            assert (!dateAlbum.containsKey("Item07"));
-
-            try {
-                dateAlbum.containsValue(null);
-            } catch (final Exception e) {
-                assert (e.getMessage().equals("null values are illegal on method parameter \"value\""));
-            }
-
-            assert (dateAlbum.containsValue(tciA01));
-            assert (!dateAlbum.containsValue(new String("Hello")));
-
-            final Set<Entry<String, Object>> entrySet = dateAlbum.entrySet();
-            assert (entrySet.size() == 7);
-
-            try {
-                assert (dateAlbum.get(null) == null);
-            } catch (final Exception e) {
-                assert (e.getMessage()
-                        .equals("album \"DateContextAlbum:0.0.1\" null keys are illegal on keys for get()"));
-            }
-
-            final Object aObject = dateAlbum.get("Item03");
-            assert (aObject.equals(tciA03));
-
-            try {
-                final Object object = dateAlbum.put(null, null);
-                assert (object == null);
-            } catch (final Exception e) {
-                assert (e.getMessage()
-                        .equals("album \"DateContextAlbum:0.0.1\" null keys are illegal on keys for put()"));
-            }
-
-            // Put null ContextItem should work (return null)
-            try {
-                dateAlbum.put("ItemNull", null);
-            } catch (final Exception e) {
-                assert (e.getMessage().equals(
-                        "album \"DateContextAlbum:0.0.1\" null values are illegal on key \"ItemNull\" for put()"));
-            }
-
-            // Should return null
-            assert (dateAlbum.get("ItemNull") == null);
-
-            // Put should return the previous contextItem
-            tciA00.setDST(false);
-            final TestContextItem00A tciA03_clone = new TestContextItem00A(tciA03);
-            tciA03_clone.setDST(true);
-            TestContextItem00A retItem = (TestContextItem00A) dateAlbum.put("Item03", tciA03_clone);
-            assert (retItem.equals(tciA03));
-            retItem = (TestContextItem00A) dateAlbum.put("Item03", tciA03);
-            assert (retItem.equals(tciA03_clone));
-
-            try {
-                dateAlbum.put("ItemNull", null);
-                assert (dateAlbum.get("ItemNull") == null);
-            } catch (final Exception e) {
-                assert (e.getMessage().equals(
-                        "album \"DateContextAlbum:0.0.1\" null values are illegal on key \"ItemNull\" for put()"));
-            }
-
-            dateAlbum.put("TestAA", tciA00);
-            assert (dateAlbum.get("TestAA").equals(tciA00));
-
-            // Should print warning
-            try {
-                dateAlbum.put("TestAA", null);
-            } catch (final Exception e) {
-                assert (e.getMessage().equals(
-                        "album \"DateContextAlbum:0.0.1\" null values are illegal on key \"TestAA\" for put()"));
-            }
-            assert (dateAlbum.size() == 8);
-            try {
-                dateAlbum.put("TestAB", null);
-            } catch (final Exception e) {
-                assert (e.getMessage().equals(
-                        "album \"DateContextAlbum:0.0.1\" null values are illegal on key \"TestAB\" for put()"));
-            }
-            assert (dateAlbum.size() == 8);
-
-            // Should do removes
-            dateAlbum.remove("TestAA");
-            dateAlbum.remove("TestAB");
-            dateAlbum.remove("ItemNull");
-            assert (dateAlbum.size() == 7);
-            assert (dateAlbumCopy.values().containsAll(mapValues));
-            // CHECKSTYLE:ON: checkstyle:magicNumber
-        } catch (final Exception exception) {
-            LOGGER.error("Error: ", exception);
-            contextDistributor.clear();
-            assert ("Test has failed".equals(""));
-        }
-
-        try {
-            contextDistributor.clear();
-        } catch (final Exception exception) {
-            LOGGER.error("Error occured while clearing context distributor", exception);
-            assert ("Test has failed".equals(""));
-        }
-    }
-}
diff --git a/context/pom.xml b/context/pom.xml
index dad8502..9fa599a 100644
--- a/context/pom.xml
+++ b/context/pom.xml
@@ -35,6 +35,6 @@
 
     <modules>
         <module>context-management</module>
-        <module>context-test</module>
+        <module>context-test-utils</module>
     </modules>
 </project>
\ No newline at end of file
diff --git a/plugins/plugins-context/context-distribution/context-distribution-hazelcast/pom.xml b/plugins/plugins-context/context-distribution/context-distribution-hazelcast/pom.xml
index ce80a7a..71806c5 100644
--- a/plugins/plugins-context/context-distribution/context-distribution-hazelcast/pom.xml
+++ b/plugins/plugins-context/context-distribution/context-distribution-hazelcast/pom.xml
@@ -36,5 +36,11 @@
             <artifactId>hazelcast</artifactId>
             <version>${version.hazelcast}</version>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.apex-pdp.context</groupId>
+            <artifactId>context-test-utils</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>
\ No newline at end of file
diff --git a/plugins/plugins-context/context-distribution/context-distribution-hazelcast/src/test/java/org/onap/policy/apex/plugins/context/distribution/hazelcast/HazelcastContextDistributorTest.java b/plugins/plugins-context/context-distribution/context-distribution-hazelcast/src/test/java/org/onap/policy/apex/plugins/context/distribution/hazelcast/HazelcastContextDistributorTest.java
new file mode 100644
index 0000000..c999c95
--- /dev/null
+++ b/plugins/plugins-context/context-distribution/context-distribution-hazelcast/src/test/java/org/onap/policy/apex/plugins/context/distribution/hazelcast/HazelcastContextDistributorTest.java
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed 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.
+ * 
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.plugins.context.distribution.hazelcast;
+
+import java.io.IOException;
+
+import org.junit.Test;
+import org.onap.policy.apex.context.parameters.ContextParameters;
+import org.onap.policy.apex.context.test.distribution.ContextAlbumUpdate;
+import org.onap.policy.apex.context.test.distribution.ContextInstantiation;
+import org.onap.policy.apex.context.test.distribution.ContextUpdate;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
+public class HazelcastContextDistributorTest {
+    private static final String HAZEL_CAST_PLUGIN_CLASS = HazelcastContextDistributor.class.getCanonicalName();
+    // Logger for this class
+    private static final XLogger logger = XLoggerFactory.getXLogger(HazelcastContextDistributorTest.class);
+
+
+    @Test
+    public void testContextAlbumUpdateHazelcast() throws ApexModelException, IOException, ApexException {
+        logger.debug("Running testContextAlbumUpdateHazelcast test . . .");
+
+        final ContextParameters contextParameters = new ContextParameters();
+        contextParameters.getDistributorParameters().setPluginClass(HAZEL_CAST_PLUGIN_CLASS);
+        new ContextAlbumUpdate().testContextAlbumUpdate();
+
+        logger.debug("Ran testContextAlbumUpdateHazelcast test");
+    }
+
+    @Test
+    public void testContextInstantiationHazelcast() throws ApexModelException, IOException, ApexException {
+        logger.debug("Running testContextInstantiationHazelcast test . . .");
+
+        final ContextParameters contextParameters = new ContextParameters();
+        contextParameters.getDistributorParameters().setPluginClass(HAZEL_CAST_PLUGIN_CLASS);
+        new ContextInstantiation().testContextInstantiation();
+
+        logger.debug("Ran testContextInstantiationHazelcast test");
+    }
+
+    @Test
+    public void testContextUpdateHazelcast() throws ApexModelException, IOException, ApexException {
+        logger.debug("Running testContextUpdateHazelcast test . . .");
+
+        final ContextParameters contextParameters = new ContextParameters();
+        contextParameters.getDistributorParameters().setPluginClass(HAZEL_CAST_PLUGIN_CLASS);
+        new ContextUpdate().testContextUpdate();
+
+        logger.debug("Ran testContextUpdateHazelcast test");
+    }
+
+}
diff --git a/plugins/plugins-context/context-distribution/context-distribution-infinispan/pom.xml b/plugins/plugins-context/context-distribution/context-distribution-infinispan/pom.xml
index 7592edd..c6985a9 100644
--- a/plugins/plugins-context/context-distribution/context-distribution-infinispan/pom.xml
+++ b/plugins/plugins-context/context-distribution/context-distribution-infinispan/pom.xml
@@ -42,6 +42,12 @@
                 </exclusion>
             </exclusions>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.apex-pdp.context</groupId>
+            <artifactId>context-test-utils</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file
diff --git a/plugins/plugins-context/context-distribution/context-distribution-infinispan/src/test/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanContextDistributorTest.java b/plugins/plugins-context/context-distribution/context-distribution-infinispan/src/test/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanContextDistributorTest.java
new file mode 100644
index 0000000..34fa7d4
--- /dev/null
+++ b/plugins/plugins-context/context-distribution/context-distribution-infinispan/src/test/java/org/onap/policy/apex/plugins/context/distribution/infinispan/InfinispanContextDistributorTest.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed 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.
+ * 
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.policy.apex.plugins.context.distribution.infinispan;
+
+import java.io.IOException;
+
+import org.junit.Test;
+import org.onap.policy.apex.context.parameters.ContextParameters;
+import org.onap.policy.apex.context.test.distribution.ContextAlbumUpdate;
+import org.onap.policy.apex.context.test.distribution.ContextInstantiation;
+import org.onap.policy.apex.context.test.distribution.ContextUpdate;
+import org.onap.policy.apex.context.test.distribution.SequentialContextInstantiation;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
+public class InfinispanContextDistributorTest {
+    private static final XLogger logger = XLoggerFactory.getXLogger(InfinispanContextDistributorTest.class);
+
+    private static final String PLUGIN_CLASS = InfinispanContextDistributor.class.getCanonicalName();
+
+    @Test
+    public void testContextAlbumUpdateInfinispan() throws ApexModelException, IOException, ApexException {
+        logger.debug("Running testContextAlbumUpdateInfinispan test . . .");
+
+        final ContextParameters contextParameters = new ContextParameters();
+        contextParameters.getDistributorParameters().setPluginClass(PLUGIN_CLASS);
+        new InfinispanDistributorParameters();
+
+        new ContextAlbumUpdate().testContextAlbumUpdate();
+
+        logger.debug("Ran testContextAlbumUpdateInfinispan test");
+    }
+
+    @Test
+    public void testContextInstantiationInfinispan() throws ApexModelException, IOException, ApexException {
+        logger.debug("Running testContextInstantiationInfinispan test . . .");
+
+        final ContextParameters contextParameters = new ContextParameters();
+        contextParameters.getDistributorParameters().setPluginClass(PLUGIN_CLASS);
+        new InfinispanDistributorParameters();
+
+        new ContextInstantiation().testContextInstantiation();
+
+        logger.debug("Ran testContextInstantiationInfinispan test");
+    }
+
+    @Test
+    public void testContextUpdateInfinispan() throws ApexModelException, IOException, ApexException {
+        logger.debug("Running testContextUpdateInfinispan test . . .");
+
+        final ContextParameters contextParameters = new ContextParameters();
+        contextParameters.getDistributorParameters().setPluginClass(PLUGIN_CLASS);
+        new InfinispanDistributorParameters();
+
+        new ContextUpdate().testContextUpdate();
+
+        logger.debug("Ran testContextUpdateInfinispan test");
+    }
+
+    @Test
+    public void testSequentialContextInstantiationInfinispan() throws ApexModelException, IOException, ApexException {
+        logger.debug("Running testSequentialContextInstantiationInfinispan test . . .");
+
+        final ContextParameters contextParameters = new ContextParameters();
+        contextParameters.getDistributorParameters().setPluginClass(PLUGIN_CLASS);
+        new InfinispanDistributorParameters();
+
+        new SequentialContextInstantiation().testSequentialContextInstantiation();
+
+        logger.debug("Ran testSequentialContextInstantiationInfinispan test");
+    }
+
+
+}
diff --git a/plugins/plugins-context/plugins-context-test/src/main/java/org/onap/policy/apex/plugins/context/test/HazelcastContextInjection.java b/plugins/plugins-context/plugins-context-test/src/main/java/org/onap/policy/apex/plugins/context/test/HazelcastContextInjection.java
deleted file mode 100644
index 4c21103..0000000
--- a/plugins/plugins-context/plugins-context-test/src/main/java/org/onap/policy/apex/plugins/context/test/HazelcastContextInjection.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed 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.
- * 
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.apex.plugins.context.test;
-
-import java.util.Map.Entry;
-import java.util.Random;
-
-import org.onap.policy.apex.context.ContextAlbum;
-import org.onap.policy.apex.context.ContextException;
-import org.onap.policy.apex.context.Distributor;
-import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
-import org.onap.policy.apex.context.parameters.ContextParameters;
-import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation;
-import org.onap.policy.apex.model.basicmodel.service.ModelService;
-import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum;
-import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbums;
-import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
-import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema;
-import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas;
-
-/**
- * @author Liam Fallon (liam.fallon@ericsson.com)
- */
-public final class HazelcastContextInjection {
-    private static final int ONE_SECOND = 1000;
-    private static final int SIXTY_SECONDS = 60;
-    private static final int MAX_INT_10000 = 10000;
-
-    /**
-     * Default constructor is private to avoid subclassing.
-     */
-    private HazelcastContextInjection() {}
-
-    /**
-     * The main method.
-     * 
-     * @param args the arguments to the method
-     * @throws ContextException exceptions thrown on context injection
-     */
-    public static void main(final String[] args) throws ContextException {
-        // For convenience, I created model programmatically, it can of course be read in from a
-        // policy model
-        final AxContextModel contextModel = createContextModel();
-
-        // The model must be registered in the model service.
-        ModelService.registerModel(AxContextSchemas.class, contextModel.getSchemas());
-        ModelService.registerModel(AxContextAlbums.class, contextModel.getAlbums());
-
-        // Configure APex to use Hazelcast distribution and locking
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters()
-                .setPluginClass("com.ericsson.apex.plugins.context.distribution.hazelcast.HazelcastContextDistributor");
-        contextParameters.getLockManagerParameters()
-                .setPluginClass("com.ericsson.apex.plugins.context.locking.hazelcast.HazelcastLockManager");
-
-        // Fire up our distribution
-        final AxArtifactKey distributorKey = new AxArtifactKey("ApexDistributor", "0.0.1");
-        final Distributor contextDistributor = new DistributorFactory().getDistributor(distributorKey);
-        contextDistributor.init(distributorKey);
-
-        // Now, get a handle on the album
-        final ContextAlbum myContextAlbum =
-                contextDistributor.createContextAlbum(new AxArtifactKey("LongContextAlbum", "0.0.1"));
-
-        final int jvmID = new Random().nextInt(MAX_INT_10000);
-        final String myLongKey = "MyLong_" + jvmID;
-        final String commonLongKey = "CommonLong";
-
-        // Put the long value for this JVM into the map
-        myContextAlbum.put(myLongKey, new Long(0L));
-
-        // Put the common long value to be used across JVMS in the map if its not htere already
-        myContextAlbum.lockForWriting(commonLongKey);
-        if (myContextAlbum.get(commonLongKey) == null) {
-            myContextAlbum.put(commonLongKey, new Long(0L));
-        }
-        myContextAlbum.unlockForWriting(commonLongKey);
-
-        // Run for 60 seconds to show multi JVM
-        for (int i = 0; i < SIXTY_SECONDS; i++) {
-            System.out.println("JVM " + jvmID + " iteration " + i);
-
-            for (final Entry<String, Object> albumEntry : myContextAlbum.entrySet()) {
-                myContextAlbum.lockForReading(albumEntry.getKey());
-                System.out.println(albumEntry.getKey() + "-->" + albumEntry.getValue());
-                myContextAlbum.unlockForReading(albumEntry.getKey());
-            }
-            System.out.println("old " + myLongKey + ": " + myContextAlbum.get(myLongKey));
-
-            myContextAlbum.lockForReading(commonLongKey);
-            System.out.println("old CommonLong: " + myContextAlbum.get(commonLongKey));
-            myContextAlbum.unlockForReading(commonLongKey);
-
-            Long myLong = (Long) myContextAlbum.get(myLongKey);
-            myLong++;
-            myContextAlbum.put(myLongKey, myLong);
-
-            myContextAlbum.lockForWriting(commonLongKey);
-            Long commonLong = (Long) myContextAlbum.get(commonLongKey);
-            commonLong++;
-            myContextAlbum.put(commonLongKey, commonLong);
-            myContextAlbum.unlockForWriting(commonLongKey);
-
-            System.out.println("new myLong: " + myContextAlbum.get(myLongKey));
-            System.out.println("new commonLong: " + myContextAlbum.get(commonLongKey));
-
-            try {
-                Thread.sleep(ONE_SECOND);
-            } catch (final Exception e) {
-                e.printStackTrace();
-            }
-        }
-
-        contextDistributor.clear();
-    }
-
-    /**
-     * This method just creates a simple context model programatically.
-     * 
-     * @return a context model
-     */
-    public static AxContextModel createContextModel() {
-        final AxContextSchema longSchema =
-                new AxContextSchema(new AxArtifactKey("LongSchema", "0.0.1"), "Java", "java.lang.Long");
-
-        final AxContextSchemas schemas = new AxContextSchemas(new AxArtifactKey("Schemas", "0.0.1"));
-        schemas.getSchemasMap().put(longSchema.getKey(), longSchema);
-
-        final AxContextAlbum longAlbumDefinition = new AxContextAlbum(new AxArtifactKey("LongContextAlbum", "0.0.1"),
-                "APPLICATION", true, longSchema.getKey());
-
-        final AxContextAlbums albums = new AxContextAlbums(new AxArtifactKey("context", "0.0.1"));
-        albums.getAlbumsMap().put(longAlbumDefinition.getKey(), longAlbumDefinition);
-
-        final AxKeyInformation keyInformation = new AxKeyInformation(new AxArtifactKey("KeyInfoMapKey", "0.0.1"));
-        final AxContextModel contextModel =
-                new AxContextModel(new AxArtifactKey("LongContextModel", "0.0.1"), schemas, albums, keyInformation);
-        contextModel.setKeyInformation(keyInformation);
-        keyInformation.generateKeyInfo(contextModel);
-
-        return contextModel;
-    }
-}
diff --git a/plugins/plugins-context/plugins-context-test/src/main/java/org/onap/policy/apex/plugins/context/test/package-info.java b/plugins/plugins-context/plugins-context-test/src/main/java/org/onap/policy/apex/plugins/context/test/package-info.java
deleted file mode 100644
index eab3618..0000000
--- a/plugins/plugins-context/plugins-context-test/src/main/java/org/onap/policy/apex/plugins/context/test/package-info.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed 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.
- * 
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-/**
- * Is used to inject context into context maps for test purposes.
- * 
- * @author Liam Fallon (liam.fallon@ericsson.com)
- */
-package org.onap.policy.apex.plugins.context.test;
diff --git a/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/distribution/TestContextAlbumUpdate.java b/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/distribution/TestContextAlbumUpdate.java
deleted file mode 100644
index c24ef40..0000000
--- a/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/distribution/TestContextAlbumUpdate.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed 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.
- * 
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.apex.plugins.context.test.distribution;
-
-import java.io.IOException;
-
-import org.junit.After;
-import org.junit.Test;
-import org.onap.policy.apex.context.parameters.ContextParameters;
-import org.onap.policy.apex.context.parameters.DistributorParameters;
-import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
-import org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanDistributorParameters;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
-import org.onap.policy.apex.context.test.distribution.ContextAlbumUpdate;
-
-public class TestContextAlbumUpdate {
-    // Logger for this class
-    private static final XLogger logger = XLoggerFactory.getXLogger(TestContextAlbumUpdate.class);
-
-    @Test
-    public void testContextAlbumUpdateJVMLocalVarSet() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testContextAlbumUpdateJVMLocalVarSet test . . .");
-
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters()
-                .setPluginClass(DistributorParameters.DEFAULT_DISTRIBUTOR_PLUGIN_CLASS);
-        new ContextAlbumUpdate().testContextAlbumUpdate();
-
-        logger.debug("Ran testContextAlbumUpdateJVMLocalVarSet test");
-    }
-
-    @Test
-    public void testContextAlbumUpdateHazelcast() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testContextAlbumUpdateHazelcast test . . .");
-
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters().setPluginClass(
-                "org.onap.policy.apex.plugins.context.distribution.hazelcast.HazelcastContextDistributor");
-        new ContextAlbumUpdate().testContextAlbumUpdate();
-
-        logger.debug("Ran testContextAlbumUpdateHazelcast test");
-    }
-
-    @Test
-    public void testContextAlbumUpdateInfinispan() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testContextAlbumUpdateInfinispan test . . .");
-
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters().setPluginClass(
-                "org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanContextDistributor");
-        new InfinispanDistributorParameters();
-
-        new ContextAlbumUpdate().testContextAlbumUpdate();
-
-        logger.debug("Ran testContextAlbumUpdateInfinispan test");
-    }
-
-    @Test
-    public void testContextAlbumUpdateJVMLocalVarNotSet() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testContextAlbumUpdateJVMLocalVarNotSet test . . .");
-
-        new ContextParameters();
-        new ContextAlbumUpdate().testContextAlbumUpdate();
-
-        logger.debug("Ran testContextAlbumUpdateJVMLocalVarNotSet test");
-    }
-
-    /**
-     * Test context update cleardown.
-     */
-    @After
-    public void testContextAlbumUpdateCleardown() {}
-}
diff --git a/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/distribution/TestContextInstantiation.java b/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/distribution/TestContextInstantiation.java
deleted file mode 100644
index a13b798..0000000
--- a/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/distribution/TestContextInstantiation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed 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.
- * 
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.apex.plugins.context.test.distribution;
-
-import java.io.IOException;
-
-import org.junit.Test;
-import org.onap.policy.apex.context.parameters.ContextParameters;
-import org.onap.policy.apex.context.parameters.DistributorParameters;
-import org.onap.policy.apex.context.test.distribution.ContextInstantiation;
-import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
-import org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanDistributorParameters;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
-public class TestContextInstantiation {
-    // Logger for this class
-    private static final XLogger logger = XLoggerFactory.getXLogger(TestContextInstantiation.class);
-
-    @Test
-    public void testContextInstantiationJVMLocalVarSet() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testContextInstantiationJVMLocalVarSet test . . .");
-
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters()
-                .setPluginClass(DistributorParameters.DEFAULT_DISTRIBUTOR_PLUGIN_CLASS);
-        new ContextInstantiation().testContextInstantiation();
-
-        logger.debug("Ran testContextInstantiationJVMLocalVarSet test");
-    }
-
-    @Test
-    public void testContextInstantiationHazelcast() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testContextInstantiationHazelcast test . . .");
-
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters().setPluginClass(
-                "org.onap.policy.apex.plugins.context.distribution.hazelcast.HazelcastContextDistributor");
-        new ContextInstantiation().testContextInstantiation();
-
-        logger.debug("Ran testContextInstantiationHazelcast test");
-    }
-
-    @Test
-    public void testContextInstantiationInfinispan() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testContextInstantiationInfinispan test . . .");
-
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters().setPluginClass(
-                "org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanContextDistributor");
-        new InfinispanDistributorParameters();
-
-        new ContextInstantiation().testContextInstantiation();
-
-        logger.debug("Ran testContextInstantiationInfinispan test");
-    }
-
-    @Test
-    public void testContextInstantiationJVMLocalVarNotSet() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testContextInstantiationJVMLocalVarNotSet test . . .");
-
-        new ContextParameters();
-        new ContextInstantiation().testContextInstantiation();
-
-        logger.debug("Ran testContextInstantiationJVMLocalVarNotSet test");
-    }
-}
diff --git a/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/distribution/TestContextUpdate.java b/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/distribution/TestContextUpdate.java
deleted file mode 100644
index 3abfd18..0000000
--- a/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/distribution/TestContextUpdate.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed 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.
- * 
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.apex.plugins.context.test.distribution;
-
-import java.io.IOException;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.policy.apex.context.parameters.ContextParameters;
-import org.onap.policy.apex.context.parameters.DistributorParameters;
-import org.onap.policy.apex.context.test.distribution.ContextUpdate;
-import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
-import org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanDistributorParameters;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
-public class TestContextUpdate {
-    // Logger for this class
-    private static final XLogger logger = XLoggerFactory.getXLogger(TestContextUpdate.class);
-
-    @Before
-    public void beforeTest() {}
-
-    @After
-    public void afterTest() {}
-
-    @Test
-    public void testContextUpdateJVMLocalVarSet() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testContextUpdateJVMLocalVarSet test . . .");
-
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters()
-                .setPluginClass(DistributorParameters.DEFAULT_DISTRIBUTOR_PLUGIN_CLASS);
-        new ContextUpdate().testContextUpdate();
-
-        logger.debug("Ran testContextUpdateJVMLocalVarSet test");
-    }
-
-    @Test
-    public void testContextUpdateHazelcast() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testContextUpdateHazelcast test . . .");
-
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters().setPluginClass(
-                "org.onap.policy.apex.plugins.context.distribution.hazelcast.HazelcastContextDistributor");
-        new ContextUpdate().testContextUpdate();
-
-        logger.debug("Ran testContextUpdateHazelcast test");
-    }
-
-    @Test
-    public void testContextUpdateInfinispan() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testContextUpdateInfinispan test . . .");
-
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters().setPluginClass(
-                "org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanContextDistributor");
-        new InfinispanDistributorParameters();
-
-        new ContextUpdate().testContextUpdate();
-
-        logger.debug("Ran testContextUpdateInfinispan test");
-    }
-
-    @Test
-    public void testContextUpdateJVMLocalVarNotSet() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testContextUpdateJVMLocalVarNotSet test . . .");
-
-        new ContextParameters();
-        new ContextUpdate().testContextUpdate();
-
-        logger.debug("Ran testContextUpdateJVMLocalVarNotSet test");
-    }
-}
diff --git a/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/distribution/TestSequentialContextInstantiation.java b/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/distribution/TestSequentialContextInstantiation.java
deleted file mode 100644
index cc3f520..0000000
--- a/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/distribution/TestSequentialContextInstantiation.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed 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.
- * 
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.apex.plugins.context.test.distribution;
-
-import java.io.IOException;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.policy.apex.context.parameters.ContextParameters;
-import org.onap.policy.apex.context.parameters.DistributorParameters;
-import org.onap.policy.apex.context.test.distribution.SequentialContextInstantiation;
-import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
-import org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanDistributorParameters;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
-/**
- * The Class TestContextInstantiation.
- *
- * @author Sergey Sachkov (sergey.sachkov@ericsson.com)
- */
-public class TestSequentialContextInstantiation {
-    // Logger for this class
-    private static final XLogger logger = XLoggerFactory.getXLogger(TestSequentialContextInstantiation.class);
-
-    @Before
-    public void beforeTest() {}
-
-    @After
-    public void afterTest() {}
-
-    @Test
-    public void testSequentialContextInstantiationJVMLocalVarSet()
-            throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testSequentialContextInstantiationJVMLocalVarSet test . . .");
-
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters()
-                .setPluginClass(DistributorParameters.DEFAULT_DISTRIBUTOR_PLUGIN_CLASS);
-        new SequentialContextInstantiation().testSequentialContextInstantiation();
-
-        logger.debug("Ran testSequentialContextInstantiationJVMLocalVarSet test");
-    }
-
-    @Test
-    public void testSequentialContextInstantiationHazelcast() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testSequentialContextInstantiationHazelcast test . . .");
-
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters().setPluginClass(
-                "org.onap.policy.apex.plugins.context.distribution.hazelcast.HazelcastContextDistributor");
-        new SequentialContextInstantiation().testSequentialContextInstantiation();
-
-        logger.debug("Ran testSequentialContextInstantiationHazelcast test");
-    }
-
-    @Test
-    public void testSequentialContextInstantiationInfinispan() throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testSequentialContextInstantiationInfinispan test . . .");
-
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters().setPluginClass(
-                "org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanContextDistributor");
-        new InfinispanDistributorParameters();
-
-        new SequentialContextInstantiation().testSequentialContextInstantiation();
-
-        logger.debug("Ran testSequentialContextInstantiationInfinispan test");
-    }
-
-    @Test
-    public void testSequentialContextInstantiationJVMLocalVarNotSet()
-            throws ApexModelException, IOException, ApexException {
-        logger.debug("Running testSequentialContextInstantiationJVMLocalVarNotSet test . . .");
-
-        new ContextParameters();
-        new SequentialContextInstantiation().testSequentialContextInstantiation();
-
-        logger.debug("Ran testSequentialContextInstantiationJVMLocalVarNotSet test");
-    }
-}
diff --git a/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/locking/CuratorManagerTest.java b/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/locking/CuratorManagerTest.java
deleted file mode 100644
index 0b9d606..0000000
--- a/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/locking/CuratorManagerTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * ================================================================================
- * Licensed 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.
- * 
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.apex.plugins.context.test.locking;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-
-import org.apache.curator.test.TestingServer;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.policy.apex.context.ContextException;
-import org.onap.policy.apex.context.parameters.ContextParameters;
-import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.policy.apex.plugins.context.locking.curator.CuratorLockManager;
-import org.onap.policy.apex.plugins.context.locking.curator.CuratorLockManagerParameters;
-
-public class CuratorManagerTest {
-    // Zookeeper test server
-    TestingServer zkTestServer;
-
-    @Before
-    public void beforeTest() throws Exception {
-        zkTestServer = new TestingServer(62181);
-    }
-
-    @After
-    public void afterTest() throws IOException {
-        zkTestServer.stop();
-    }
-
-    @Test
-    public void testCuratorManagerConfigProperty() {
-        final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.setLockManagerParameters(new CuratorLockManagerParameters());
-
-        ((CuratorLockManagerParameters) contextParameters.getLockManagerParameters()).setZookeeperAddress(null);
-
-        try {
-            final CuratorLockManager curatorManager = new CuratorLockManager();
-            curatorManager.init(new AxArtifactKey());
-            assertNull(curatorManager);
-        } catch (final ContextException e) {
-            assertEquals(e.getMessage(),
-                    "could not set up Curator locking, check if the curator Zookeeper address parameter is set correctly");
-        }
-
-        ((CuratorLockManagerParameters) contextParameters.getLockManagerParameters()).setZookeeperAddress("zooby");
-
-        try {
-            final CuratorLockManager curatorManager = new CuratorLockManager();
-            curatorManager.init(new AxArtifactKey());
-            fail("Curator manager test should fail");
-        } catch (final ContextException e) {
-            assertEquals(e.getMessage(),
-                    "could not connect to Zookeeper server at \"zooby\", see error log for details");
-        }
-
-        ((CuratorLockManagerParameters) contextParameters.getLockManagerParameters())
-                .setZookeeperAddress("localhost:62181");
-
-        try {
-            final CuratorLockManager curatorManager0 = new CuratorLockManager();
-            curatorManager0.init(new AxArtifactKey());
-            assertNotNull(curatorManager0);
-
-            final CuratorLockManager curatorManager1 = new CuratorLockManager();
-            curatorManager1.init(new AxArtifactKey());
-            assertNotNull(curatorManager1);
-
-            curatorManager0.shutdown();
-            curatorManager1.shutdown();
-        } catch (final ContextException e) {
-            assertNull(e);
-        }
-    }
-}
diff --git a/plugins/plugins-context/pom.xml b/plugins/plugins-context/pom.xml
index 7be7843..8e3c728 100644
--- a/plugins/plugins-context/pom.xml
+++ b/plugins/plugins-context/pom.xml
@@ -41,64 +41,11 @@
         </dependency>
     </dependencies>
 
-    <profiles>
-        <profile>
-            <id>apexDefault</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-            <modules>
-                <module>context-schema</module>
-                <module>context-distribution</module>
-                <module>context-locking</module>
-                <module>context-persistence</module>
-            </modules>
-        </profile>
-        <profile>
-            <id>apexTests</id>
-            <activation>
-                <property>
-                    <name>apexTests</name>
-                </property>
-            </activation>
-            <modules>
-                <module>context-schema</module>
-                <module>context-distribution</module>
-                <module>context-locking</module>
-                <module>context-persistence</module>
-                <module>plugins-context-test</module>
-            </modules>
-        </profile>
-        <profile>
-            <id>apexMetrics</id>
-            <activation>
-                <property>
-                    <name>apexMetrics</name>
-                </property>
-            </activation>
-            <modules>
-                <module>context-schema</module>
-                <module>context-distribution</module>
-                <module>context-locking</module>
-                <module>context-persistence</module>
-                <module>context-metrics</module>
-            </modules>
-        </profile>
-        <profile>
-            <id>apexAll</id>
-            <activation>
-                <property>
-                    <name>apexAll</name>
-                </property>
-            </activation>
-            <modules>
-                <module>context-schema</module>
-                <module>context-distribution</module>
-                <module>context-locking</module>
-                <module>context-persistence</module>
-                <module>plugins-context-test</module>
-                <module>context-metrics</module>
-            </modules>
-        </profile>
-    </profiles>
+    <modules>
+        <module>context-schema</module>
+        <module>context-distribution</module>
+        <module>context-locking</module>
+        <module>context-persistence</module>
+    </modules>
+
 </project>
\ No newline at end of file
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml
index 59a3560..9ee4311 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml
@@ -59,7 +59,7 @@
         </dependency>
         <dependency>
             <groupId>org.onap.policy.apex-pdp.context</groupId>
-            <artifactId>context-test</artifactId>
+            <artifactId>context-test-utils</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/services/services-engine/pom.xml b/services/services-engine/pom.xml
index cde5d3b..84765da 100644
--- a/services/services-engine/pom.xml
+++ b/services/services-engine/pom.xml
@@ -48,7 +48,7 @@
         </dependency>
         <dependency>
             <groupId>org.onap.policy.apex-pdp.context</groupId>
-            <artifactId>context-test</artifactId>
+            <artifactId>context-test-utils</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/plugins/plugins-context/context-metrics/pom.xml b/testsuites/integration/integration-context-metrics/pom.xml
similarity index 92%
rename from plugins/plugins-context/context-metrics/pom.xml
rename to testsuites/integration/integration-context-metrics/pom.xml
index 1e5800c..47a1083 100644
--- a/plugins/plugins-context/context-metrics/pom.xml
+++ b/testsuites/integration/integration-context-metrics/pom.xml
@@ -22,15 +22,14 @@
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
-        <groupId>org.onap.policy.apex-pdp.plugins.plugins-context</groupId>
-        <artifactId>plugins-context</artifactId>
+        <groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
+        <artifactId>integration</artifactId>
         <version>2.0.0-SNAPSHOT</version>
     </parent>
-    <artifactId>context-metrics</artifactId>
+    <artifactId>integration-context-metrics</artifactId>
     <name>${project.artifactId}</name>
     <description>[${project.parent.artifactId}] module to calculate metrics using various plugins</description>
 
-
     <dependencies>
         <dependency>
             <groupId>org.onap.policy.apex-pdp.core</groupId>
@@ -39,7 +38,7 @@
         </dependency>
         <dependency>
             <groupId>org.onap.policy.apex-pdp.context</groupId>
-            <artifactId>context-test</artifactId>
+            <artifactId>context-test-utils</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
diff --git a/plugins/plugins-context/context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetrics.java b/testsuites/integration/integration-context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetrics.java
similarity index 98%
rename from plugins/plugins-context/context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetrics.java
rename to testsuites/integration/integration-context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetrics.java
index de719c9..cbe06ed 100644
--- a/plugins/plugins-context/context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetrics.java
+++ b/testsuites/integration/integration-context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetrics.java
@@ -32,7 +32,7 @@
 import org.onap.policy.apex.context.parameters.ContextParameters;
 import org.onap.policy.apex.context.parameters.DistributorParameters;
 import org.onap.policy.apex.context.parameters.LockManagerParameters;
-import org.onap.policy.apex.context.test.concepts.TestContextItem003;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
 import org.onap.policy.apex.context.test.factory.TestContextAlbumFactory;
 import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
@@ -458,7 +458,7 @@
 
         for (int i = 0; i < longArraySize; i++) {
             final String longKey = Integer.toString(i);
-            final TestContextItem003 longItem = new TestContextItem003();
+            final TestContextLongItem longItem = new TestContextLongItem();
             longItem.setLongValue(0);
             lTypeAlbum.put(longKey, longItem);
         }
@@ -475,7 +475,7 @@
 
         try {
             for (int i = 0; i < longArraySize; i++) {
-                total += ((TestContextItem003) lTypeAlbum.get(Integer.toString(i))).getLongValue();
+                total += ((TestContextLongItem) lTypeAlbum.get(Integer.toString(i))).getLongValue();
             }
 
             outMetricLine(testName, "Totaled");
diff --git a/plugins/plugins-context/context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsJVM.java b/testsuites/integration/integration-context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsJVM.java
similarity index 100%
rename from plugins/plugins-context/context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsJVM.java
rename to testsuites/integration/integration-context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsJVM.java
diff --git a/plugins/plugins-context/context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsJVMThread.java b/testsuites/integration/integration-context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsJVMThread.java
similarity index 100%
rename from plugins/plugins-context/context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsJVMThread.java
rename to testsuites/integration/integration-context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsJVMThread.java
diff --git a/plugins/plugins-context/context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsThread.java b/testsuites/integration/integration-context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsThread.java
similarity index 94%
rename from plugins/plugins-context/context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsThread.java
rename to testsuites/integration/integration-context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsThread.java
index 2752536..e207832 100644
--- a/plugins/plugins-context/context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsThread.java
+++ b/testsuites/integration/integration-context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/ConcurrentContextMetricsThread.java
@@ -26,7 +26,7 @@
 import org.onap.policy.apex.context.ContextException;
 import org.onap.policy.apex.context.Distributor;
 import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
-import org.onap.policy.apex.context.test.concepts.TestContextItem003;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
 import org.onap.policy.apex.context.test.factory.TestContextAlbumFactory;
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -109,7 +109,7 @@
             final String nextLongKey = Integer.toString(rand.nextInt(longArraySize));
 
             if (lockType == 0) {
-                final TestContextItem003 item = (TestContextItem003) lTypeAlbum.get(nextLongKey);
+                final TestContextLongItem item = (TestContextLongItem) lTypeAlbum.get(nextLongKey);
                 final long value = item.getLongValue();
                 if (LOGGER.isTraceEnabled()) {
                     LOGGER.trace("lock type=" + lockType + ", value=" + value);
@@ -125,7 +125,7 @@
                     continue;
                 }
 
-                final TestContextItem003 item = (TestContextItem003) lTypeAlbum.get(nextLongKey);
+                final TestContextLongItem item = (TestContextLongItem) lTypeAlbum.get(nextLongKey);
                 final long value = item.getLongValue();
                 if (LOGGER.isTraceEnabled()) {
                     LOGGER.trace("lock type=" + lockType + ", value=" + value);
@@ -148,7 +148,7 @@
                     continue;
                 }
 
-                final TestContextItem003 item = (TestContextItem003) lTypeAlbum.get(nextLongKey);
+                final TestContextLongItem item = (TestContextLongItem) lTypeAlbum.get(nextLongKey);
                 long value = item.getLongValue();
                 if (LOGGER.isTraceEnabled()) {
                     LOGGER.trace("lock type=" + lockType + ", value=" + value);
diff --git a/plugins/plugins-context/context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/package-info.java b/testsuites/integration/integration-context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/package-info.java
similarity index 100%
rename from plugins/plugins-context/context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/package-info.java
rename to testsuites/integration/integration-context-metrics/src/main/java/org/onap/policy/apex/plugins/context/metrics/package-info.java
diff --git a/plugins/plugins-context/context-metrics/src/test/java/org/onap/policy/apex/plugins/context/metrics/TestMetrics.java b/testsuites/integration/integration-context-metrics/src/test/java/org/onap/policy/apex/plugins/context/metrics/TestMetrics.java
similarity index 100%
rename from plugins/plugins-context/context-metrics/src/test/java/org/onap/policy/apex/plugins/context/metrics/TestMetrics.java
rename to testsuites/integration/integration-context-metrics/src/test/java/org/onap/policy/apex/plugins/context/metrics/TestMetrics.java
diff --git a/plugins/plugins-context/context-metrics/src/test/resources/hazelcast/hazelcast.xml b/testsuites/integration/integration-context-metrics/src/test/resources/hazelcast/hazelcast.xml
similarity index 100%
rename from plugins/plugins-context/context-metrics/src/test/resources/hazelcast/hazelcast.xml
rename to testsuites/integration/integration-context-metrics/src/test/resources/hazelcast/hazelcast.xml
diff --git a/plugins/plugins-context/context-metrics/src/test/resources/infinispan/infinispan.xml b/testsuites/integration/integration-context-metrics/src/test/resources/infinispan/infinispan.xml
similarity index 100%
rename from plugins/plugins-context/context-metrics/src/test/resources/infinispan/infinispan.xml
rename to testsuites/integration/integration-context-metrics/src/test/resources/infinispan/infinispan.xml
diff --git a/plugins/plugins-context/plugins-context-test/pom.xml b/testsuites/integration/integration-context-test/pom.xml
similarity index 77%
rename from plugins/plugins-context/plugins-context-test/pom.xml
rename to testsuites/integration/integration-context-test/pom.xml
index 7239abe..8c62339 100644
--- a/plugins/plugins-context/plugins-context-test/pom.xml
+++ b/testsuites/integration/integration-context-test/pom.xml
@@ -17,18 +17,20 @@
   SPDX-License-Identifier: Apache-2.0
   ============LICENSE_END=========================================================
 -->
+
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
-        <groupId>org.onap.policy.apex-pdp.plugins.plugins-context</groupId>
-        <artifactId>plugins-context</artifactId>
+        <groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
+        <artifactId>integration</artifactId>
         <version>2.0.0-SNAPSHOT</version>
     </parent>
 
-    <artifactId>plugins-context-test</artifactId>
+    <artifactId>integration-context-test</artifactId>
     <name>${project.artifactId}</name>
-    <description>[${project.parent.artifactId}] module to run context tests using various plugins</description>
+    <description>[${project.parent.artifactId}] module to run context tests using various plugins, multi-threads and multi-JVMs</description>
+
 
     <dependencies>
         <dependency>
@@ -51,6 +53,12 @@
             <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.context-locking</groupId>
             <artifactId>context-locking-curator</artifactId>
             <version>${project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.onap.policy.apex-pdp.plugins.plugins-context.context-locking</groupId>
@@ -59,7 +67,7 @@
         </dependency>
         <dependency>
             <groupId>org.onap.policy.apex-pdp.context</groupId>
-            <artifactId>context-test</artifactId>
+            <artifactId>context-test-utils</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
@@ -77,23 +85,4 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-site-plugin</artifactId>
-                <configuration>
-                    <skip>true</skip>
-                    <skipDeploy>true</skipDeploy>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <forkMode>always</forkMode>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 </project>
\ No newline at end of file
diff --git a/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/locking/TestConcurrentContext.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/locking/TestConcurrentContext.java
similarity index 84%
rename from plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/locking/TestConcurrentContext.java
rename to testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/locking/TestConcurrentContext.java
index e02009a..7a3a29c 100644
--- a/plugins/plugins-context/plugins-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/locking/TestConcurrentContext.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/plugins/context/test/locking/TestConcurrentContext.java
@@ -21,6 +21,7 @@
 package org.onap.policy.apex.plugins.context.test.locking;
 
 import static org.junit.Assert.assertEquals;
+import static org.onap.policy.apex.context.parameters.DistributorParameters.DEFAULT_DISTRIBUTOR_PLUGIN_CLASS;
 
 import java.io.File;
 import java.io.IOException;
@@ -31,12 +32,15 @@
 import java.util.Enumeration;
 import java.util.TreeSet;
 
-import org.apache.curator.shaded.com.google.common.io.Files;
 import org.apache.zookeeper.server.NIOServerCnxnFactory;
 import org.apache.zookeeper.server.ZooKeeperServer;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+import org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor;
+import org.onap.policy.apex.context.impl.locking.jvmlocal.JVMLocalLockManager;
 import org.onap.policy.apex.context.parameters.ContextParameters;
 import org.onap.policy.apex.context.parameters.DistributorParameters;
 import org.onap.policy.apex.context.parameters.LockManagerParameters;
@@ -44,8 +48,12 @@
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
 import org.onap.policy.apex.model.basicmodel.service.ParameterService;
+import org.onap.policy.apex.plugins.context.distribution.hazelcast.HazelcastContextDistributor;
+import org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanContextDistributor;
 import org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanDistributorParameters;
+import org.onap.policy.apex.plugins.context.locking.curator.CuratorLockManager;
 import org.onap.policy.apex.plugins.context.locking.curator.CuratorLockManagerParameters;
+import org.onap.policy.apex.plugins.context.locking.hazelcast.HazelcastLockManager;
 import org.slf4j.ext.XLogger;
 import org.slf4j.ext.XLoggerFactory;
 
@@ -61,6 +69,7 @@
     private static final XLogger logger = XLoggerFactory.getXLogger(TestConcurrentContext.class);
 
     // Test parameters
+    private static final String ZOOKEEPER_ADDRESS = "127.0.0.1";
     private static final int ZOOKEEPER_START_PORT = 62181;
     private static final int TEST_JVM_COUNT_SINGLE_JVM = 1;
     private static final int TEST_JVM_COUNT_MULTI_JVM = 3;
@@ -75,6 +84,9 @@
     private static int nextZookeeperPort = ZOOKEEPER_START_PORT;
     private int zookeeperPort;
 
+    @Rule
+    public final TemporaryFolder folder = new TemporaryFolder();
+
     @BeforeClass
     public static void configure() throws Exception {
         System.setProperty("java.net.preferIPv4Stack", "true");
@@ -113,7 +125,7 @@
     public static void teardown() throws IOException {}
 
     private void startZookeeperServer() throws IOException, InterruptedException {
-        final File zookeeperDirectory = Files.createTempDir();
+        final File zookeeperDirectory = folder.newFolder("zookeeperDirectory");
 
         zookeeperPort = nextZookeeperPort++;
 
@@ -133,8 +145,7 @@
         logger.debug("Running testConcurrentContextJVMLocalVarSet test . . .");
 
         final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getLockManagerParameters()
-                .setPluginClass("org.onap.policy.apex.context.impl.locking.jvmlocal.JVMLocalLockManager");
+        contextParameters.getLockManagerParameters().setPluginClass(JVMLocalLockManager.class.getCanonicalName());
         final long result = new ConcurrentContext().testConcurrentContext("JVMLocalVarSet", TEST_JVM_COUNT_SINGLE_JVM,
                 TEST_THREAD_COUNT_SINGLE_JVM, TEST_THREAD_LOOPS);
 
@@ -161,10 +172,8 @@
         logger.debug("Running testConcurrentContextMultiJVMNoLock test . . .");
 
         final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters()
-                .setPluginClass("org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor");
-        contextParameters.getLockManagerParameters()
-                .setPluginClass("org.onap.policy.apex.context.impl.locking.jvmlocal.JVMLocalLockManager");
+        contextParameters.getDistributorParameters().setPluginClass(JVMLocalDistributor.class.getCanonicalName());
+        contextParameters.getLockManagerParameters().setPluginClass(JVMLocalLockManager.class.getCanonicalName());
 
         final long result = new ConcurrentContext().testConcurrentContext("testConcurrentContextMultiJVMNoLock",
                 TEST_JVM_COUNT_MULTI_JVM, TEST_THREAD_COUNT_MULTI_JVM, TEST_THREAD_LOOPS);
@@ -180,10 +189,8 @@
         logger.debug("Running testConcurrentContextHazelcastLock test . . .");
 
         final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters()
-                .setPluginClass(DistributorParameters.DEFAULT_DISTRIBUTOR_PLUGIN_CLASS);
-        contextParameters.getLockManagerParameters()
-                .setPluginClass("org.onap.policy.apex.plugins.context.locking.hazelcast.HazelcastLockManager");
+        contextParameters.getDistributorParameters().setPluginClass(DEFAULT_DISTRIBUTOR_PLUGIN_CLASS);
+        contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getCanonicalName());
         final long result = new ConcurrentContext().testConcurrentContext("HazelcastLock", TEST_JVM_COUNT_SINGLE_JVM,
                 TEST_THREAD_COUNT_SINGLE_JVM, TEST_THREAD_LOOPS);
 
@@ -203,8 +210,8 @@
                 .setPluginClass(DistributorParameters.DEFAULT_DISTRIBUTOR_PLUGIN_CLASS);
 
         final CuratorLockManagerParameters curatorParameters = new CuratorLockManagerParameters();
-        curatorParameters.setPluginClass("org.onap.policy.apex.plugins.context.locking.curator.CuratorLockManager");
-        curatorParameters.setZookeeperAddress("127.0.0.1:" + zookeeperPort);
+        curatorParameters.setPluginClass(CuratorLockManager.class.getCanonicalName());
+        curatorParameters.setZookeeperAddress(ZOOKEEPER_ADDRESS + ":" + zookeeperPort);
         contextParameters.setLockManagerParameters(curatorParameters);
         ParameterService.registerParameters(LockManagerParameters.class, curatorParameters);
 
@@ -223,10 +230,9 @@
         logger.debug("Running testConcurrentContextHazelcastMultiJVMHazelcastLock test . . .");
 
         final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters().setPluginClass(
-                "org.onap.policy.apex.plugins.context.distribution.hazelcast.HazelcastContextDistributor");
-        contextParameters.getLockManagerParameters()
-                .setPluginClass("org.onap.policy.apex.plugins.context.locking.hazelcast.HazelcastLockManager");
+        contextParameters.getDistributorParameters()
+                .setPluginClass(HazelcastContextDistributor.class.getCanonicalName());
+        contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getCanonicalName());
         final long result = new ConcurrentContext().testConcurrentContext("HazelcastMultiHazelcastlock",
                 TEST_JVM_COUNT_MULTI_JVM, TEST_THREAD_COUNT_MULTI_JVM, TEST_THREAD_LOOPS);
 
@@ -241,12 +247,10 @@
 
         final ContextParameters contextParameters = new ContextParameters();
         final InfinispanDistributorParameters infinispanParameters = new InfinispanDistributorParameters();
-        infinispanParameters.setPluginClass(
-                "org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanContextDistributor");
+        infinispanParameters.setPluginClass(InfinispanContextDistributor.class.getCanonicalName());
         infinispanParameters.setConfigFile("infinispan/infinispan-context-test.xml");
         contextParameters.setDistributorParameters(infinispanParameters);
-        contextParameters.getLockManagerParameters()
-                .setPluginClass("org.onap.policy.apex.plugins.context.locking.hazelcast.HazelcastLockManager");
+        contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getCanonicalName());
 
         final long result = new ConcurrentContext().testConcurrentContext("InfinispanMultiHazelcastlock",
                 TEST_JVM_COUNT_MULTI_JVM, TEST_THREAD_COUNT_MULTI_JVM, TEST_THREAD_LOOPS);
@@ -264,14 +268,13 @@
 
         final ContextParameters contextParameters = new ContextParameters();
         final InfinispanDistributorParameters infinispanParameters = new InfinispanDistributorParameters();
-        infinispanParameters.setPluginClass(
-                "org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanContextDistributor");
+        infinispanParameters.setPluginClass(InfinispanContextDistributor.class.getCanonicalName());
         infinispanParameters.setConfigFile("infinispan/infinispan-context-test.xml");
         contextParameters.setDistributorParameters(infinispanParameters);
 
         final CuratorLockManagerParameters curatorParameters = new CuratorLockManagerParameters();
-        curatorParameters.setPluginClass("org.onap.policy.apex.plugins.context.locking.curator.CuratorLockManager");
-        curatorParameters.setZookeeperAddress("127.0.0.1:" + zookeeperPort);
+        curatorParameters.setPluginClass(CuratorLockManager.class.getCanonicalName());
+        curatorParameters.setZookeeperAddress(ZOOKEEPER_ADDRESS + ":" + zookeeperPort);
         contextParameters.setLockManagerParameters(curatorParameters);
         ParameterService.registerParameters(LockManagerParameters.class, curatorParameters);
 
@@ -293,12 +296,12 @@
         startZookeeperServer();
 
         final ContextParameters contextParameters = new ContextParameters();
-        contextParameters.getDistributorParameters().setPluginClass(
-                "org.onap.policy.apex.plugins.context.distribution.hazelcast.HazelcastContextDistributor");
+        contextParameters.getDistributorParameters()
+                .setPluginClass(HazelcastContextDistributor.class.getCanonicalName());
 
         final CuratorLockManagerParameters curatorParameters = new CuratorLockManagerParameters();
-        curatorParameters.setPluginClass("org.onap.policy.apex.plugins.context.locking.curator.CuratorLockManager");
-        curatorParameters.setZookeeperAddress("127.0.0.1:" + zookeeperPort);
+        curatorParameters.setPluginClass(CuratorLockManager.class.getCanonicalName());
+        curatorParameters.setZookeeperAddress(ZOOKEEPER_ADDRESS + ":" + zookeeperPort);
         contextParameters.setLockManagerParameters(curatorParameters);
         ParameterService.registerParameters(LockManagerParameters.class, curatorParameters);
 
diff --git a/testsuites/integration/integration-context-test/src/test/resources/hazelcast/hazelcast.xml b/testsuites/integration/integration-context-test/src/test/resources/hazelcast/hazelcast.xml
new file mode 100644
index 0000000..d69f24b
--- /dev/null
+++ b/testsuites/integration/integration-context-test/src/test/resources/hazelcast/hazelcast.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+   Copyright (C) 2016-2018 Ericsson. All rights reserved.
+  ================================================================================
+  Licensed 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.
+  
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+-->
+
+<hazelcast xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <group>
+        <name>ApexHazelcastGroup</name>
+        <password>ApexHazelcastGroupPassword</password>
+    </group>
+    <network>
+        <port auto-increment="true">5706</port>
+        <join>
+            <multicast enabled="false">
+                <multicast-group>224.2.2.10</multicast-group>
+                <multicast-port>54327</multicast-port>
+            </multicast>
+            <tcp-ip enabled="true">
+                <members>127.0.0.1</members>
+            </tcp-ip>
+        </join>
+        <interfaces enabled="false">
+			<!-- This value will allow hazelcast to run locally from the IDE -->
+            <interface>127.0.0.*</interface>
+        </interfaces>
+    </network>
+    <properties>
+        <property name="hazelcast.icmp.enabled">true</property>
+        <property name="hazelcast.logging.type">slf4j</property>
+		<!-- disable the hazelcast shutdown hook - prefer to control the shutdown 
+			in code -->
+        <property name="hazelcast.shutdownhook.enabled">false</property>
+        <property name="hazelcast.graceful.shutdown.max.wait">60</property>
+    </properties>
+    <executor-service>
+        <pool-size>16</pool-size>
+    </executor-service>
+</hazelcast>
diff --git a/testsuites/integration/integration-context-test/src/test/resources/infinispan/default-jgroups-tcp.xml b/testsuites/integration/integration-context-test/src/test/resources/infinispan/default-jgroups-tcp.xml
new file mode 100644
index 0000000..028cf1d
--- /dev/null
+++ b/testsuites/integration/integration-context-test/src/test/resources/infinispan/default-jgroups-tcp.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+   Copyright (C) 2016-2018 Ericsson. All rights reserved.
+  ================================================================================
+  Licensed 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.
+  
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+-->
+
+<config xmlns="urn:org:jgroups"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups-4.0.xsd">
+   <TCP bind_addr="${jgroups.tcp.address:127.0.0.1}"
+        bind_port="${jgroups.tcp.port:7800}"
+        enable_diagnostics="false"
+        thread_naming_pattern="pl"
+        send_buf_size="640k"
+        sock_conn_timeout="300"
+        bundler_type="no-bundler"
+
+        thread_pool.min_threads="${jgroups.thread_pool.min_threads:0}"
+        thread_pool.max_threads="${jgroups.thread_pool.max_threads:200}"
+        thread_pool.keep_alive_time="60000"
+   />
+   <MPING bind_addr="${jgroups.tcp.address:127.0.0.1}"
+          mcast_addr="${jgroups.mping.mcast_addr:228.2.4.6}"
+          mcast_port="${jgroups.mping.mcast_port:43366}"
+          ip_ttl="${jgroups.udp.ip_ttl:2}" 
+   />
+   <MERGE3 min_interval="10000" 
+           max_interval="30000" 
+   />
+   <FD_SOCK />
+   <FD_ALL timeout="60000" 
+           interval="15000" 
+           timeout_check_interval="5000" 
+   />
+   <VERIFY_SUSPECT timeout="5000" />
+   <pbcast.NAKACK2 use_mcast_xmit="false"
+                   xmit_interval="100"
+                   xmit_table_num_rows="50"
+                   xmit_table_msgs_per_row="1024"
+                   xmit_table_max_compaction_time="30000"
+                   resend_last_seqno="true"
+   />
+   <UNICAST3 xmit_interval="100"
+             xmit_table_num_rows="50"
+             xmit_table_msgs_per_row="1024"
+             xmit_table_max_compaction_time="30000"
+             conn_expiry_timeout="0"
+   />
+   <pbcast.STABLE stability_delay="500"
+                  desired_avg_gossip="5000"
+                  max_bytes="1M"
+   />
+   <pbcast.GMS print_local_addr="false"
+               install_view_locally_first="true"
+               join_timeout="${jgroups.join_timeout:5000}"
+   />
+   <MFC max_credits="2m" 
+        min_threshold="0.40"
+   />
+   <FRAG3/>
+</config>
diff --git a/testsuites/integration/integration-context-test/src/test/resources/infinispan/default-jgroups-udp.xml b/testsuites/integration/integration-context-test/src/test/resources/infinispan/default-jgroups-udp.xml
new file mode 100644
index 0000000..17ba5ea
--- /dev/null
+++ b/testsuites/integration/integration-context-test/src/test/resources/infinispan/default-jgroups-udp.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+   Copyright (C) 2016-2018 Ericsson. All rights reserved.
+  ================================================================================
+  Licensed 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.
+  
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+-->
+
+<config xmlns="urn:org:jgroups"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups-4.0.xsd">
+   <UDP mcast_addr="${jgroups.udp.mcast_addr:228.6.7.8}"
+        mcast_port="${jgroups.udp.mcast_port:46655}"
+        ucast_send_buf_size="1m"
+        mcast_send_buf_size="1m"
+        ucast_recv_buf_size="20m"
+        mcast_recv_buf_size="25m"
+        ip_ttl="${jgroups.ip_ttl:2}"
+        thread_naming_pattern="pl"
+        enable_diagnostics="false"
+        bundler_type="no-bundler"
+        max_bundle_size="8500"
+
+        thread_pool.min_threads="${jgroups.thread_pool.min_threads:0}"
+        thread_pool.max_threads="${jgroups.thread_pool.max_threads:200}"
+        thread_pool.keep_alive_time="60000"
+   />
+   <PING />
+   <MERGE3 min_interval="10000" 
+           max_interval="30000" 
+   />
+   <FD_SOCK />
+   <FD_ALL timeout="60000" 
+           interval="15000" 
+           timeout_check_interval="5000" 
+   />
+   <VERIFY_SUSPECT timeout="5000" 
+   />
+   <pbcast.NAKACK2 xmit_interval="100"
+                   xmit_table_num_rows="50"
+                   xmit_table_msgs_per_row="1024"
+                   xmit_table_max_compaction_time="30000"
+                   resend_last_seqno="true"
+   />
+   <UNICAST3 xmit_interval="100"
+             xmit_table_num_rows="50"
+             xmit_table_msgs_per_row="1024"
+             xmit_table_max_compaction_time="30000"
+             conn_expiry_timeout="0"
+   />
+   <pbcast.STABLE stability_delay="500"
+                  desired_avg_gossip="5000"
+                  max_bytes="1M"
+   />
+   <pbcast.GMS print_local_addr="false"
+               install_view_locally_first="true"
+               join_timeout="${jgroups.join_timeout:5000}"
+   />
+   <UFC max_credits="2m" 
+        min_threshold="0.40"
+   />
+   <MFC max_credits="2m" 
+        min_threshold="0.40"
+   />
+   <FRAG3 frag_size="8000"/>
+</config>
diff --git a/testsuites/integration/integration-context-test/src/test/resources/infinispan/infinispan-context-test.xml b/testsuites/integration/integration-context-test/src/test/resources/infinispan/infinispan-context-test.xml
new file mode 100644
index 0000000..9fa7a2a
--- /dev/null
+++ b/testsuites/integration/integration-context-test/src/test/resources/infinispan/infinispan-context-test.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+   Copyright (C) 2016-2018 Ericsson. All rights reserved.
+  ================================================================================
+  Licensed 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.
+  
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+-->
+
+<infinispan xmlns="urn:infinispan:config:8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="urn:infinispan:config:8.0 http://infinispan.org/schemas/infinispan-config-8.0.xsd">
+    <jgroups>
+        <stack-file name="tcpStack" path="infinispan/default-jgroups-tcp.xml" />
+    </jgroups>
+
+    <cache-container name="ApexCacheContainer" default-cache="LTypeContextAlbum_0.0.1">
+        <transport cluster="apexCluster" stack="tcpStack" />
+        <jmx />
+        <replicated-cache name="LTypeContextAlbum_0.0.1" mode="SYNC" statistics="true">
+            <state-transfer enabled="true" />
+        </replicated-cache>
+    </cache-container>
+</infinispan>
diff --git a/testsuites/integration/integration-context-test/src/test/resources/logback-test.xml b/testsuites/integration/integration-context-test/src/test/resources/logback-test.xml
new file mode 100644
index 0000000..7fd818d
--- /dev/null
+++ b/testsuites/integration/integration-context-test/src/test/resources/logback-test.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+   Copyright (C) 2016-2018 Ericsson. All rights reserved.
+  ================================================================================
+  Licensed 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.
+  
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+-->
+
+<configuration>
+	<contextName>Apex</contextName>
+	<statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
+	<property name="LOG_DIR" value="${java.io.tmpdir}/apex_logging/" />
+
+	<!-- USE FOR STD OUT ONLY -->
+	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern>
+		</encoder>
+	</appender>
+
+	<logger name="org.apache.zookeeper.ClientCnxn" level="OFF" additivity="false">
+		<appender-ref ref="STDOUT" />
+	</logger>
+	
+	<appender name="FILE"
+		class="ch.qos.logback.core.FileAppender">
+		<file>${LOG_DIR}/apex.log</file>
+		<encoder>
+			<pattern>%d %-5relative [procId=${processId}] [%thread] %-5level
+				%logger{26} - %msg %n %ex{full}</pattern>
+		</encoder>
+	</appender>
+
+	<appender name="CTXT_FILE"
+		class="ch.qos.logback.core.FileAppender">
+		<file>${LOG_DIR}/apex_ctxt.log</file>
+		<encoder>
+			<pattern>%d %-5relative [procId=${processId}] [%thread] %-5level
+				%logger{26} - %msg %n %ex{full}</pattern>
+		</encoder>
+	</appender>
+
+    <logger name="org.infinispan" level="info" additivity="false">
+        <appender-ref ref="STDOUT" />
+    </logger>
+
+    <logger name="com.ericsson.apex.context.monitoring" level="TRACE" additivity="false">
+        <appender-ref ref="STDOUT" />
+    </logger>
+    
+    <logger name="com.ericsson.apex.context.monitoring" level="TRACE" additivity="false">
+        <appender-ref ref="CTXT_FILE" />
+    </logger>
+    
+    <logger name="org.jgroups" level="off" additivity="false">
+        <appender-ref ref="STDOUT" />
+    </logger>
+
+    <root level="info">
+        <appender-ref ref="STDOUT" />
+    </root>
+
+</configuration>
diff --git a/testsuites/integration/integration-uservice-test/pom.xml b/testsuites/integration/integration-uservice-test/pom.xml
index 5eeeeff..8fe5164 100644
--- a/testsuites/integration/integration-uservice-test/pom.xml
+++ b/testsuites/integration/integration-uservice-test/pom.xml
@@ -48,7 +48,7 @@
         </dependency>
         <dependency>
             <groupId>org.onap.policy.apex-pdp.context</groupId>
-            <artifactId>context-test</artifactId>
+            <artifactId>context-test-utils</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
@@ -209,6 +209,12 @@
             <artifactId>jersey-container-servlet-core</artifactId>
             <version>${version.jersey.core}</version>
         </dependency>
+        <dependency>
+            <groupId>org.onap.policy.apex-pdp.context</groupId>
+            <artifactId>context-test-utils</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/testsuites/integration/pom.xml b/testsuites/integration/pom.xml
index 4e6bec7..366556c 100644
--- a/testsuites/integration/pom.xml
+++ b/testsuites/integration/pom.xml
@@ -31,8 +31,43 @@
     <artifactId>integration</artifactId>
     <packaging>pom</packaging>
 
-    <modules>
-        <module>integration-common</module>
-        <module>integration-uservice-test</module>
-    </modules>
+    <profiles>
+        <profile>
+            <id>apexDefault</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <modules>
+                <module>integration-common</module>
+                <module>integration-uservice-test</module>
+            </modules>
+        </profile>
+        <profile>
+            <id>apexMetrics</id>
+            <activation>
+                <property>
+                    <name>apexMetrics</name>
+                </property>
+            </activation>
+            <modules>
+                <module>integration-common</module>
+                <module>integration-uservice-test</module>
+                <module>integration-context-metrics</module>
+            </modules>
+        </profile>
+        <profile>
+            <id>apexAll</id>
+            <activation>
+                <property>
+                    <name>apexAll</name>
+                </property>
+            </activation>
+            <modules>
+                <module>integration-common</module>
+                <module>integration-uservice-test</module>
+                <module>integration-context-test</module>
+                <module>integration-context-metrics</module>
+            </modules>
+        </profile>
+    </profiles>
 </project>
\ No newline at end of file
