diff --git a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CodeGeneratorCliEditorTest.java b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CodeGeneratorCliEditorTest.java
index 83aef2d..921591b 100644
--- a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CodeGeneratorCliEditorTest.java
+++ b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CodeGeneratorCliEditorTest.java
@@ -2,19 +2,20 @@
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
  *  Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
+ *  Modifications Copyright (C) 2020 Nordix Foundation
  * ================================================================================
  * 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=========================================================
  */
@@ -22,11 +23,9 @@
 package org.onap.policy.apex.auth.clicodegen;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
 
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -65,32 +64,25 @@
     private File outFile = null;
 
     @Test
-    public void test() throws IOException {
+    public void test() throws IOException, ApexModelException {
         final CodeGeneratorCliEditor codeGen = new CodeGeneratorCliEditor();
 
         outFile = File.createTempFile("ApexTestGenerated", ".apex");
 
         ApexModelReader<AxPolicyModel> modelReader = null;
-        try {
-            modelReader = new ApexModelReader<>(AxPolicyModel.class);
-        } catch (ApexModelException e1) {
-            fail("test should not throw an exception");
-        }
+        modelReader = new ApexModelReader<>(AxPolicyModel.class);
+
         modelReader.setValidateFlag(false);
         AxPolicyModel apexPolicyModel = null;
-        try {
-            apexPolicyModel = modelReader
+        apexPolicyModel = modelReader
                             .read(new FileInputStream(new File("src/test/resources/models/TestPolicyModel.json")));
-        } catch (ApexModelException | FileNotFoundException e) {
-            fail("test should not throw an exception");
-        }
 
         assertEquals(0, generateCli(codeGen, apexPolicyModel));
     }
 
     /**
      * Generate the CLI from the model.
-     * 
+     *
      * @param codeGen the code generator
      * @param policyModel the policy model
      * @throws IOException  on generation exceptions
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java
index 5180291..5aaa8a3 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java
@@ -21,10 +21,10 @@
 
 package org.onap.policy.apex.context.impl;
 
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -33,14 +33,12 @@
 import org.junit.Test;
 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.jvmlocal.JvmLocalDistributor;
 import org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters;
 import org.onap.policy.apex.context.parameters.ContextParameterConstants;
 import org.onap.policy.apex.context.parameters.ContextParameters;
 import org.onap.policy.apex.context.parameters.SchemaParameters;
-import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException;
 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
 import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
 import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
@@ -93,42 +91,19 @@
 
     @Test
     public void testNullsOnConstructor() {
-        try {
-            new ContextAlbumImpl(null, null, null);
-            fail("this test should throw an exception");
-        } catch (IllegalArgumentException e) {
-            assertEquals("Context album definition may not be null", e.getMessage());
-        } catch (ContextException e) {
-            fail("this test should throw an IllegalArgumentException");
-        }
+        assertThatThrownBy(() -> new ContextAlbumImpl(null, null, null))
+            .hasMessage("Context album definition may not be null");
 
-        try {
-            new ContextAlbumImpl(new AxContextAlbum(), null, null);
-            fail("this test should throw an exception");
-        } catch (IllegalArgumentException e) {
-            assertEquals("Distributor may not be null", e.getMessage());
-        } catch (ContextException e) {
-            fail("this test should throw an IllegalArgumentException");
-        }
+        assertThatThrownBy(() -> new ContextAlbumImpl(new AxContextAlbum(), null, null))
+            .hasMessage("Distributor may not be null");
 
-        try {
-            new ContextAlbumImpl(new AxContextAlbum(), new JvmLocalDistributor(), null);
-            fail("this test should throw an exception");
-        } catch (IllegalArgumentException e) {
-            assertEquals("Album map may not be null", e.getMessage());
-        } catch (ContextException e) {
-            fail("this test should throw an IllegalArgumentException");
-        }
+        assertThatThrownBy(() -> new ContextAlbumImpl(new AxContextAlbum(), new JvmLocalDistributor(), null))
+            .hasMessage("Album map may not be null");
 
-        try {
-            new ContextAlbumImpl(new AxContextAlbum(), new JvmLocalDistributor(), new LinkedHashMap<String, Object>());
-            fail("this test should throw an exception");
-        } catch (ApexRuntimeException e) {
-            assertEquals("Model for org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas "
-                            + "not found in model service", e.getMessage());
-        } catch (ContextException e) {
-            fail("this test should throw an ApexRuntimeException");
-        }
+        assertThatThrownBy(() -> new ContextAlbumImpl(new AxContextAlbum(), new JvmLocalDistributor(),
+                new LinkedHashMap<String, Object>()))
+            .hasMessage("Model for org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas "
+                            + "not found in model service");
     }
 
     @Test
@@ -142,107 +117,63 @@
         AxContextAlbum axContextAlbum = new AxContextAlbum(new AxArtifactKey("TestContextAlbum", "0.0.1"), "Policy",
                         true, AxArtifactKey.getNullKey());
 
-        try {
-            new ContextAlbumImpl(axContextAlbum, new JvmLocalDistributor(), new LinkedHashMap<String, Object>());
-            fail("this test should throw an exception");
-        } catch (ContextException e) {
-            assertEquals("could not initiate schema management for context album AxContextAlbum",
-                            e.getMessage().substring(0, 69));
-        }
+        assertThatThrownBy(() -> new ContextAlbumImpl(axContextAlbum, new JvmLocalDistributor(),
+                new LinkedHashMap<String, Object>()))
+            .hasMessageContaining("could not initiate schema management for context album AxContextAlbum");
 
         axContextAlbum.setItemSchema(simpleStringSchema.getKey());
         Distributor distributor = new JvmLocalDistributor();
         distributor.init(axContextAlbum.getKey());
         ContextAlbum album = new ContextAlbumImpl(axContextAlbum, distributor, new LinkedHashMap<String, Object>());
 
-        AxContextAlbum axContextAlbumRo = new AxContextAlbum(new AxArtifactKey("TestContextAlbum", "0.0.1"), "Policy",
-                        false, simpleStringSchema.getKey());
-        ContextAlbum albumRo = new ContextAlbumImpl(axContextAlbumRo, distributor, new LinkedHashMap<String, Object>());
-
         assertEquals("TestContextAlbum", album.getName());
         assertEquals("TestContextAlbum:0.0.1", album.getKey().getId());
         assertEquals("TestContextAlbum:0.0.1", album.getAlbumDefinition().getId());
         assertEquals("SimpleStringSchema:0.0.1", album.getSchemaHelper().getSchema().getId());
 
-        try {
-            album.containsKey(null);
-            fail("test should throw an exception");
-        } catch (ContextRuntimeException e) {
-            assertEquals("null values are illegal on method parameter \"key\"", e.getMessage());
-        }
+        assertThatThrownBy(() -> album.containsKey(null))
+            .hasMessage("null values are illegal on method parameter \"key\"");
         assertEquals(false, album.containsKey("Key0"));
 
-        try {
-            album.containsValue(null);
-            fail("test should throw an exception");
-        } catch (ContextRuntimeException e) {
-            assertEquals("null values are illegal on method parameter \"value\"", e.getMessage());
-        }
+        assertThatThrownBy(() -> album.containsValue(null))
+            .hasMessage("null values are illegal on method parameter \"value\"");
         assertEquals(false, album.containsValue("some value"));
 
-        try {
-            album.get(null);
-            fail("test should throw an exception");
-        } catch (ContextRuntimeException e) {
-            assertEquals("album \"TestContextAlbum:0.0.1\" null keys are illegal on keys for get()", e.getMessage());
-        }
+        assertThatThrownBy(() -> album.get(null))
+            .hasMessage("album \"TestContextAlbum:0.0.1\" null keys are illegal on keys for get()");
 
-        try {
-            album.put(null, null);
-            fail("test should throw an exception");
-        } catch (ContextRuntimeException e) {
-            assertEquals("album \"TestContextAlbum:0.0.1\" null keys are illegal on keys for put()", e.getMessage());
-        }
+        assertThatThrownBy(() -> album.put(null, null))
+            .hasMessage("album \"TestContextAlbum:0.0.1\" null keys are illegal on keys for put()");
 
-        try {
-            album.put("KeyNull", null);
-            fail("test should throw an exception");
-        } catch (ContextRuntimeException e) {
-            assertEquals("album \"TestContextAlbum:0.0.1\" null values are illegal on key \"KeyNull\" for put()",
-                            e.getMessage());
-        }
+        assertThatThrownBy(() -> album.put("KeyNull", null))
+            .hasMessage("album \"TestContextAlbum:0.0.1\" null values are illegal on key \"KeyNull\""
+                    + " for put()");
 
-        try {
-            albumRo.put("KeyReadOnly", "A value for a Read Only Album");
-            fail("test should throw an exception");
-        } catch (ContextRuntimeException e) {
-            assertEquals("album \"TestContextAlbum:0.0.1\" put() not allowed on read only albums "
-                            + "for key=\"KeyReadOnly\", value=\"A value for a Read Only Album", e.getMessage());
-        }
+        AxContextAlbum axContextAlbumRo = new AxContextAlbum(new AxArtifactKey("TestContextAlbum", "0.0.1"), "Policy",
+                false, simpleStringSchema.getKey());
+        ContextAlbum albumRo = new ContextAlbumImpl(axContextAlbumRo, distributor, new LinkedHashMap<String, Object>());
+
+        assertThatThrownBy(() -> albumRo.put("KeyReadOnly", "A value for a Read Only Album"))
+            .hasMessage("album \"TestContextAlbum:0.0.1\" put() not allowed on read only albums "
+                            + "for key=\"KeyReadOnly\", value=\"A value for a Read Only Album");
 
         Map<String, Object> putAllData = new LinkedHashMap<>();
         putAllData.put("AllKey0", "vaue of AllKey0");
         putAllData.put("AllKey1", "vaue of AllKey1");
         putAllData.put("AllKey2", "vaue of AllKey2");
 
-        try {
-            albumRo.putAll(putAllData);
-            fail("test should throw an exception");
-        } catch (ContextRuntimeException e) {
-            assertEquals("album \"TestContextAlbum:0.0.1\" putAll() not allowed on read only albums", e.getMessage());
-        }
+        assertThatThrownBy(() -> albumRo.putAll(putAllData))
+            .hasMessage("album \"TestContextAlbum:0.0.1\" putAll() not allowed on read only albums");
 
-        try {
-            albumRo.remove("AllKey0");
-            fail("test should throw an exception");
-        } catch (ContextRuntimeException e) {
-            assertEquals("album \"TestContextAlbum:0.0.1\" remove() not allowed "
-                            + "on read only albums for key=\"AllKey0\"", e.getMessage());
-        }
+        assertThatThrownBy(() -> albumRo.remove("AllKey0"))
+            .hasMessage("album \"TestContextAlbum:0.0.1\" remove() not allowed "
+                            + "on read only albums for key=\"AllKey0\"");
 
-        try {
-            album.remove(null);
-            fail("test should throw an exception");
-        } catch (ContextRuntimeException e) {
-            assertEquals("null values are illegal on method parameter \"keyID\"", e.getMessage());
-        }
+        assertThatThrownBy(() -> album.remove(null))
+            .hasMessage("null values are illegal on method parameter \"keyID\"");
 
-        try {
-            albumRo.clear();
-            fail("test should throw an exception");
-        } catch (ContextRuntimeException e) {
-            assertEquals("album \"TestContextAlbum:0.0.1\" clear() not allowed on read only albums", e.getMessage());
-        }
+        assertThatThrownBy(albumRo::clear)
+            .hasMessage("album \"TestContextAlbum:0.0.1\" clear() not allowed on read only albums");
 
         // The following locking tests pass because the locking protects access to Key0 across all
         // copies of the distributed album whether the key exists or not
@@ -286,13 +217,8 @@
 
         // The flush() operation fails because the distributor is not initialized with the album which
         // is fine for unit test
-        try {
-            album.flush();
-            fail("test should throw an exception");
-        } catch (ContextException e) {
-            assertEquals("map flush failed, supplied map is null", e.getMessage());
-        }
-
+        assertThatThrownBy(album::flush)
+            .hasMessage("map flush failed, supplied map is null");
         assertEquals(1, album.size());
         assertEquals(false, album.isEmpty());
 
@@ -302,14 +228,9 @@
         album.putAll(putAllData);
 
         putAllData.put("AllKey3", null);
-        try {
-            album.putAll(putAllData);
-            fail("test should throw an exception");
-        } catch (ContextRuntimeException e) {
-            assertEquals("album \"TestContextAlbum:0.0.1\" null values are illegal on key \"AllKey3\" for put()",
-                            e.getMessage());
-        }
-
+        assertThatThrownBy(() -> album.putAll(putAllData))
+            .hasMessage("album \"TestContextAlbum:0.0.1\" null values are illegal on key "
+                    + "\"AllKey3\" for put()");
         assertEquals("New value of Key0", album.remove("Key0"));
 
         album.clear();
@@ -353,15 +274,13 @@
         otherAlbum.put("Key", 123);
         assertNotEquals(album, otherAlbum);
 
-        try {
-            otherAlbum.put("Key", "BadValue");
-            fail("test should throw an exception here");
-        } catch (ContextRuntimeException cre) {
-            assertEquals("Failed to set context value for key \"Key\" in album \"TestContextAlbum:0.0.1\": "
+        assertThatThrownBy(() -> {
+            ContextAlbumImpl otherAlbumBad = new ContextAlbumImpl(axContextAlbum, distributor,
+                    new LinkedHashMap<String, Object>());
+            otherAlbumBad.put("Key", "BadValue");
+        }).hasMessage("Failed to set context value for key \"Key\" in album \"TestContextAlbum:0.0.1\": "
                             + "TestContextAlbum:0.0.1: object \"BadValue\" of class \"java.lang.String\" "
-                            + "not compatible with class \"java.lang.Integer\"", cre.getMessage());
-        }
-
+                            + "not compatible with class \"java.lang.Integer\"");
         AxContextAlbum otherAxContextAlbum = new AxContextAlbum(new AxArtifactKey("OtherTestContextAlbum", "0.0.1"),
                         "Policy", true, AxArtifactKey.getNullKey());
 
@@ -369,13 +288,8 @@
         otherAlbum = new ContextAlbumImpl(otherAxContextAlbum, distributor, new LinkedHashMap<String, Object>());
         assertNotEquals(album, otherAlbum);
 
-        try {
-            album.flush();
-            fail("test should throw an exception here");
-        } catch (ContextException ce) {
-            assertEquals("map flush failed, supplied map is null", ce.getMessage());
-        }
-
+        assertThatThrownBy(album::flush)
+            .hasMessage("map flush failed, supplied map is null");
         AxContextAlbums albums = new AxContextAlbums();
         ModelService.registerModel(AxContextAlbums.class, albums);
         albums.getAlbumsMap().put(axContextAlbum.getKey(), axContextAlbum);
diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java
index d0694ec..6e4fbbf 100644
--- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java
+++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineModelTest.java
@@ -1,20 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- *  Modifications Copyright (C) 2019 Nordix Foundation.
+ *  Modifications Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * 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=========================================================
  */
@@ -22,7 +22,6 @@
 package org.onap.policy.apex.model.enginemodel.concepts;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -112,36 +111,36 @@
 
         final AxEngineModel clonedModel = new AxEngineModel(model);
 
-        assertFalse(model.hashCode() == 0);
+        assertNotEquals(0, model.hashCode());
 
-        assertTrue(model.equals(model));
-        assertTrue(model.equals(clonedModel));
-        assertFalse(model.equals((Object) "Hello"));
-        assertFalse(model.equals(new AxEngineModel(new AxArtifactKey())));
-        assertFalse(model.equals(new AxEngineModel(new AxArtifactKey(), new AxContextSchemas(schemasKey),
-                new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.READY, stats)));
-        assertFalse(model.equals(new AxEngineModel(modelKey, new AxContextSchemas(), new AxKeyInformation(keyInfoKey),
-                new AxContextAlbums(albumKey), AxEngineState.READY, stats)));
-        assertFalse(model.equals(new AxEngineModel(modelKey, new AxContextSchemas(schemasKey), new AxKeyInformation(),
-                new AxContextAlbums(albumKey), AxEngineState.READY, stats)));
-        assertFalse(model.equals(new AxEngineModel(modelKey, new AxContextSchemas(schemasKey),
-                new AxKeyInformation(keyInfoKey), new AxContextAlbums(), AxEngineState.READY, stats)));
-        assertFalse(model.equals(new AxEngineModel(modelKey, new AxContextSchemas(schemasKey),
-                new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.STOPPED, stats)));
-        assertFalse(model.equals(new AxEngineModel(modelKey, new AxContextSchemas(schemasKey),
-                new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.READY, otherStats)));
+        assertEquals(model, model);
+        assertEquals(model, clonedModel);
+        assertNotEquals(model, (Object) "Hello");
+        assertNotEquals(model, new AxEngineModel(new AxArtifactKey()));
+        assertNotEquals(model, new AxEngineModel(new AxArtifactKey(), new AxContextSchemas(schemasKey),
+                new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.READY, stats));
+        assertNotEquals(model, new AxEngineModel(modelKey, new AxContextSchemas(), new AxKeyInformation(keyInfoKey),
+                new AxContextAlbums(albumKey), AxEngineState.READY, stats));
+        assertNotEquals(model, new AxEngineModel(modelKey, new AxContextSchemas(schemasKey), new AxKeyInformation(),
+                new AxContextAlbums(albumKey), AxEngineState.READY, stats));
+        assertNotEquals(model, new AxEngineModel(modelKey, new AxContextSchemas(schemasKey),
+                new AxKeyInformation(keyInfoKey), new AxContextAlbums(), AxEngineState.READY, stats));
+        assertNotEquals(model, new AxEngineModel(modelKey, new AxContextSchemas(schemasKey),
+                new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.STOPPED, stats));
+        assertNotEquals(model, new AxEngineModel(modelKey, new AxContextSchemas(schemasKey),
+                new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.READY, otherStats));
         model.setTimestamp(timestamp);
-        assertFalse(model.equals(new AxEngineModel(modelKey, new AxContextSchemas(schemasKey),
-                new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.READY, stats)));
+        assertNotEquals(model, new AxEngineModel(modelKey, new AxContextSchemas(schemasKey),
+                new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.READY, stats));
         model.setTimestamp(0);
-        assertTrue(model.equals(new AxEngineModel(modelKey, new AxContextSchemas(schemasKey),
-                new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.READY, stats)));
+        assertEquals(model, new AxEngineModel(modelKey, new AxContextSchemas(schemasKey),
+                new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.READY, stats));
 
         model.setTimestamp(-1);
         assertEquals(0, model.compareTo(model));
         assertEquals(0, model.compareTo(clonedModel));
         assertNotEquals(0, model.compareTo(new AxArtifactKey()));
-        assertFalse(model.equals(new AxEngineModel(new AxArtifactKey())));
+        assertNotEquals(model, new AxEngineModel(new AxArtifactKey()));
         assertNotEquals(0, model.compareTo(new AxEngineModel(new AxArtifactKey(), new AxContextSchemas(schemasKey),
                 new AxKeyInformation(keyInfoKey), new AxContextAlbums(albumKey), AxEngineState.READY, stats)));
         assertNotEquals(0, model.compareTo(new AxEngineModel(modelKey, new AxContextSchemas(),
diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java
index 9e603f4..9f48d1d 100644
--- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java
+++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/EngineStatsTest.java
@@ -22,7 +22,6 @@
 package org.onap.policy.apex.model.enginemodel.concepts;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -137,15 +136,15 @@
 
         assertNotNull(stats.getKeys());
 
-        assertFalse(stats.hashCode() == 0);
+        assertNotEquals(0, stats.hashCode());
 
-        assertTrue(stats.equals(stats));
-        assertTrue(stats.equals(clonedStats));
-        assertFalse(stats.equals(null));
+        assertEquals(stats, stats);
+        assertEquals(stats, clonedStats);
+        assertNotNull(stats);
 
         Object helloObject = "Hello";
-        assertFalse(stats.equals(helloObject));
-        assertFalse(stats.equals(new AxEngineStats(new AxReferenceKey())));
+        assertNotEquals(stats, helloObject);
+        assertNotEquals(stats, new AxEngineStats(new AxReferenceKey()));
 
         assertEquals(0, stats.compareTo(stats));
         assertEquals(0, stats.compareTo(clonedStats));
@@ -154,51 +153,51 @@
         assertNotEquals(0, stats.compareTo(new AxEngineStats(new AxReferenceKey())));
 
         stats.setTimeStamp(1);
-        assertFalse(stats.equals(new AxEngineStats(statsKey)));
+        assertNotEquals(stats, new AxEngineStats(statsKey));
         assertNotEquals(0, stats.compareTo(new AxEngineStats(statsKey)));
         stats.setTimeStamp(0);
-        assertTrue(stats.equals(new AxEngineStats(statsKey)));
+        assertEquals(stats, new AxEngineStats(statsKey));
         assertEquals(0, stats.compareTo(new AxEngineStats(statsKey)));
 
         stats.setEventCount(1);
-        assertFalse(stats.equals(new AxEngineStats(statsKey)));
+        assertNotEquals(stats, new AxEngineStats(statsKey));
         assertNotEquals(0, stats.compareTo(new AxEngineStats(statsKey)));
         stats.setEventCount(0);
-        assertTrue(stats.equals(new AxEngineStats(statsKey)));
+        assertEquals(stats, new AxEngineStats(statsKey));
         assertEquals(0, stats.compareTo(new AxEngineStats(statsKey)));
 
         stats.setLastExecutionTime(1);
-        assertFalse(stats.equals(new AxEngineStats(statsKey)));
+        assertNotEquals(stats, new AxEngineStats(statsKey));
         assertNotEquals(0, stats.compareTo(new AxEngineStats(statsKey)));
         stats.setLastExecutionTime(0);
-        assertTrue(stats.equals(new AxEngineStats(statsKey)));
+        assertEquals(stats, new AxEngineStats(statsKey));
         assertEquals(0, stats.compareTo(new AxEngineStats(statsKey)));
 
         stats.setAverageExecutionTime(1);
-        assertFalse(stats.equals(new AxEngineStats(statsKey)));
+        assertNotEquals(stats, new AxEngineStats(statsKey));
         assertNotEquals(0, stats.compareTo(new AxEngineStats(statsKey)));
         stats.setAverageExecutionTime(0);
-        assertTrue(stats.equals(new AxEngineStats(statsKey)));
+        assertEquals(stats, new AxEngineStats(statsKey));
         assertEquals(0, stats.compareTo(new AxEngineStats(statsKey)));
 
         stats.setUpTime(1);
-        assertFalse(stats.equals(new AxEngineStats(statsKey)));
+        assertNotEquals(stats, new AxEngineStats(statsKey));
         assertNotEquals(0, stats.compareTo(new AxEngineStats(statsKey)));
         stats.setUpTime(0);
-        assertTrue(stats.equals(new AxEngineStats(statsKey)));
+        assertEquals(stats, new AxEngineStats(statsKey));
         assertEquals(0, stats.compareTo(new AxEngineStats(statsKey)));
 
         assertEquals(-1, stats.compareTo(new AxEngineStats(statsKey, 0, 0, 0, 0.0, 0, 1)));
 
         stats.engineStart();
-        assertFalse(stats.equals(new AxEngineStats(statsKey)));
+        assertNotEquals(stats, new AxEngineStats(statsKey));
         final AxEngineStats newStats = new AxEngineStats(statsKey);
         newStats.setTimeStamp(stats.getTimeStamp());
-        assertFalse(stats.equals(newStats));
+        assertNotEquals(stats, newStats);
         assertNotEquals(0, stats.compareTo(newStats));
         stats.engineStop();
         stats.reset();
-        assertTrue(stats.equals(new AxEngineStats(statsKey)));
+        assertEquals(stats, new AxEngineStats(statsKey));
         assertEquals(0, stats.compareTo(new AxEngineStats(statsKey)));
     }
 
diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/ApexEngineModelTest.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/ApexEngineModelTest.java
index 770c29a..063424b 100644
--- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/ApexEngineModelTest.java
+++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/ApexEngineModelTest.java
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,7 +21,7 @@
 
 package org.onap.policy.apex.model.enginemodel.handling;
 
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -45,19 +46,19 @@
     @Test
     public void testModelValid() throws Exception {
         final AxValidationResult result = testApexModel.testApexModelValid();
-        assertTrue(result.toString().equals(VALID_MODEL_STRING));
+        assertEquals(VALID_MODEL_STRING, result.toString());
     }
 
     @Test
     public void testModelVaidateInvalidModel() throws Exception {
         final AxValidationResult result = testApexModel.testApexModelVaidateInvalidModel();
-        assertTrue(result.toString().equals(INVALID_MODEL_STRING));
+        assertEquals(INVALID_MODEL_STRING, result.toString());
     }
 
     @Test
     public void testModelVaidateMalstructured() throws Exception {
         final AxValidationResult result = testApexModel.testApexModelVaidateMalstructured();
-        assertTrue(result.toString().equals(INVALID_MODEL_MALSTRUCTURED_STRING));
+        assertEquals(INVALID_MODEL_MALSTRUCTURED_STRING, result.toString());
     }
 
     @Test
diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java
index 3ae5ac2..c86ba12 100644
--- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java
+++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventModelTest.java
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- *  Modifications Copyright (C) 2019 Nordix Foundation.
+ *  Modifications Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,10 +22,8 @@
 package org.onap.policy.apex.model.eventmodel.concepts;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -59,20 +57,20 @@
 
         final AxEventModel clonedModel = new AxEventModel(model);
 
-        assertFalse(model.hashCode() == 0);
+        assertNotEquals(0, model.hashCode());
 
-        assertTrue(model.equals(model));
-        assertTrue(model.equals(clonedModel));
-        assertFalse(model.equals((Object) "Hello"));
-        assertFalse(model.equals(new AxEventModel(new AxArtifactKey())));
-        assertFalse(model.equals(new AxEventModel(modelKey, new AxContextSchemas(), new AxKeyInformation(keyInfoKey),
-                new AxEvents(eventsKey))));
-        assertFalse(model.equals(new AxEventModel(modelKey, new AxContextSchemas(schemasKey), new AxKeyInformation(),
-                new AxEvents(eventsKey))));
-        assertFalse(model.equals(new AxEventModel(modelKey, new AxContextSchemas(schemasKey),
-                new AxKeyInformation(keyInfoKey), new AxEvents())));
-        assertTrue(model.equals(new AxEventModel(modelKey, new AxContextSchemas(schemasKey),
-                new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey))));
+        assertEquals(model, model);
+        assertEquals(model, clonedModel);
+        assertNotEquals(model, (Object) "Hello");
+        assertNotEquals(model, new AxEventModel(new AxArtifactKey()));
+        assertNotEquals(model, new AxEventModel(modelKey, new AxContextSchemas(), new AxKeyInformation(keyInfoKey),
+                new AxEvents(eventsKey)));
+        assertNotEquals(model, new AxEventModel(modelKey, new AxContextSchemas(schemasKey), new AxKeyInformation(),
+                new AxEvents(eventsKey)));
+        assertNotEquals(model, new AxEventModel(modelKey, new AxContextSchemas(schemasKey),
+                new AxKeyInformation(keyInfoKey), new AxEvents()));
+        assertEquals(model, new AxEventModel(modelKey, new AxContextSchemas(schemasKey),
+                new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey)));
 
         assertEquals(0, model.compareTo(model));
         assertEquals(0, model.compareTo(clonedModel));
diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java
index a82be12..629df1a 100644
--- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java
+++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/EventsTest.java
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- *  Modifications Copyright (C) 2019 Nordix Foundation.
+ *  Modifications Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@
 package org.onap.policy.apex.model.eventmodel.concepts;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -186,19 +185,19 @@
         assertEquals("AxEvent:(key=AxArtifactKey:(name=EventName,version=0.0.1),nameSpace=namespace",
                 clonedEvent.toString().substring(0, 77));
 
-        assertFalse(event.hashCode() == 0);
+        assertNotEquals(0, event.hashCode());
 
-        assertTrue(event.equals(event));
-        assertTrue(event.equals(clonedEvent));
-        assertFalse(event.equals(null));
-        assertFalse(event.equals((Object) "Hello"));
-        assertFalse(
-                event.equals(new AxEvent(AxArtifactKey.getNullKey(), "namespace", "source", "target", parameterMap)));
-        assertFalse(event.equals(new AxEvent(eventKey, "namespace1", "source", "target", parameterMap)));
-        assertFalse(event.equals(new AxEvent(eventKey, "namespace", "source2", "target", parameterMap)));
-        assertFalse(event.equals(new AxEvent(eventKey, "namespace", "source", "target3", parameterMap)));
-        assertFalse(event.equals(new AxEvent(eventKey, "namespace", "source", "target", parameterMapEmpty)));
-        assertTrue(event.equals(new AxEvent(eventKey, "namespace", "source", "target", parameterMap)));
+        assertEquals(event, event);
+        assertEquals(event, clonedEvent);
+        assertNotNull(event);
+        assertNotEquals(event, (Object) "Hello");
+        assertNotEquals(
+                event, new AxEvent(AxArtifactKey.getNullKey(), "namespace", "source", "target", parameterMap));
+        assertNotEquals(event, new AxEvent(eventKey, "namespace1", "source", "target", parameterMap));
+        assertNotEquals(event, new AxEvent(eventKey, "namespace", "source2", "target", parameterMap));
+        assertNotEquals(event, new AxEvent(eventKey, "namespace", "source", "target3", parameterMap));
+        assertNotEquals(event, new AxEvent(eventKey, "namespace", "source", "target", parameterMapEmpty));
+        assertEquals(event, new AxEvent(eventKey, "namespace", "source", "target", parameterMap));
 
         assertEquals(0, event.compareTo(event));
         assertEquals(0, event.compareTo(clonedEvent));
@@ -269,13 +268,13 @@
         assertEquals("AxEvents:(key=AxArtifactKey:(name=EventsKey,version=0.0.1),e",
                 clonedEvents.toString().substring(0, 60));
 
-        assertFalse(events.hashCode() == 0);
+        assertNotEquals(0, events.hashCode());
 
-        assertTrue(events.equals(events));
-        assertTrue(events.equals(clonedEvents));
-        assertFalse(events.equals(null));
-        assertFalse(events.equals((Object) "Hello"));
-        assertFalse(events.equals(new AxEvents(new AxArtifactKey())));
+        assertEquals(events, events);
+        assertEquals(events, clonedEvents);
+        assertNotNull(events);
+        assertNotEquals(events, (Object) "Hello");
+        assertNotEquals(events, new AxEvents(new AxArtifactKey()));
 
         assertEquals(0, events.compareTo(events));
         assertEquals(0, events.compareTo(clonedEvents));
diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java
index a2587b5..e5a01ed 100644
--- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java
+++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/concepts/FieldTest.java
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- *  Modifications Copyright (C) 2019 Nordix Foundation.
+ *  Modifications Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,10 +22,8 @@
 package org.onap.policy.apex.model.eventmodel.concepts;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -35,7 +33,7 @@
 
 /**
  * Test fields.
- * 
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 public class FieldTest {
@@ -110,16 +108,16 @@
                         + "parentLocalName=PLN,localName=LN),fieldSchemaKey="
                         + "AxArtifactKey:(name=SchemaName,version=0.0.1),optional=true)", clonedField.toString());
 
-        assertFalse(field.hashCode() == 0);
+        assertNotEquals(0, field.hashCode());
 
-        assertTrue(field.equals(field));
-        assertTrue(field.equals(clonedField));
-        assertFalse(field.equals(null));
-        assertFalse(field.equals((Object) "Hello"));
-        assertFalse(field.equals(new AxField(AxReferenceKey.getNullKey(), AxArtifactKey.getNullKey(), false)));
-        assertFalse(field.equals(new AxField(fieldKey, AxArtifactKey.getNullKey(), false)));
-        assertFalse(field.equals(new AxField(fieldKey, schemaKey, false)));
-        assertTrue(field.equals(new AxField(fieldKey, schemaKey, true)));
+        assertEquals(field, field);
+        assertEquals(field, clonedField);
+        assertNotNull(field);
+        assertNotEquals(field, (Object) "Hello");
+        assertNotEquals(field, new AxField(AxReferenceKey.getNullKey(), AxArtifactKey.getNullKey(), false));
+        assertNotEquals(field, new AxField(fieldKey, AxArtifactKey.getNullKey(), false));
+        assertNotEquals(field, new AxField(fieldKey, schemaKey, false));
+        assertEquals(field, new AxField(fieldKey, schemaKey, true));
 
         assertEquals(0, field.compareTo(field));
         assertEquals(0, field.compareTo(clonedField));
diff --git a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/handling/ApexEventModelTest.java b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/handling/ApexEventModelTest.java
index db752a6..c315974 100644
--- a/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/handling/ApexEventModelTest.java
+++ b/model/event-model/src/test/java/org/onap/policy/apex/model/eventmodel/handling/ApexEventModelTest.java
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,7 +21,7 @@
 
 package org.onap.policy.apex.model.eventmodel.handling;
 
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -45,31 +46,31 @@
     @Test
     public void testModelValid() throws Exception {
         final AxValidationResult result = testApexModel.testApexModelValid();
-        assertTrue(result.toString().equals(VALID_MODEL_STRING));
+        assertEquals(VALID_MODEL_STRING, result.toString());
     }
 
     @Test
     public void testApexModelVaidateObservation() throws Exception {
         final AxValidationResult result = testApexModel.testApexModelVaidateObservation();
-        assertTrue(result.toString().equals(OBSERVATION_MODEL_STRING));
+        assertEquals(OBSERVATION_MODEL_STRING, result.toString());
     }
 
     @Test
     public void testApexModelVaidateWarning() throws Exception {
         final AxValidationResult result = testApexModel.testApexModelVaidateWarning();
-        assertTrue(result.toString().equals(WARNING_MODEL_STRING));
+        assertEquals(WARNING_MODEL_STRING, result.toString());
     }
 
     @Test
     public void testModelVaidateInvalidModel() throws Exception {
         final AxValidationResult result = testApexModel.testApexModelVaidateInvalidModel();
-        assertTrue(result.toString().equals(INVALID_MODEL_STRING));
+        assertEquals(INVALID_MODEL_STRING, result.toString());
     }
 
     @Test
     public void testModelVaidateMalstructured() throws Exception {
         final AxValidationResult result = testApexModel.testApexModelVaidateMalstructured();
-        assertTrue(result.toString().equals(INVALID_MODEL_MALSTRUCTURED_STRING));
+        assertEquals(INVALID_MODEL_MALSTRUCTURED_STRING, result.toString());
     }
 
     @Test
diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiContextAlbumTest.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiContextAlbumTest.java
index 0d442e9..e6ed351 100644
--- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiContextAlbumTest.java
+++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiContextAlbumTest.java
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2020 Nordix Foundation.
  * ================================================================================
  * 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=========================================================
  */
@@ -21,7 +22,6 @@
 package org.onap.policy.apex.model.modelapi;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 
@@ -41,49 +41,49 @@
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.loadFromFile("src/test/resources/models/PolicyModel.json");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createContextAlbum("MyMap002", "0.0.2", "APPLICATION", "true", "MapType", "0.0.1",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createContextAlbum("MyMap012", "0.1.2", "ZOOBY", "false", "MapType", "0.0.1",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 012");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createContextAlbum("MyMap012", "0.1.4", "UNDEFINED", null, "MapType", "0.0.1",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 014");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createContextAlbum("MyMap012", null, null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createContextAlbum("MyMap012", null, "EPHEMERAL", null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createContextAlbum("MyMap012", null, "EPHEMERAL", "false", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createContextAlbum("MyMap012", null, "EPHEMERAL", "false", "", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createContextAlbum("MyMap012", null, "EPHEMERAL", "false", "+++", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createContextAlbum("MyMap012", null, "EPHEMERAL", "false", "MapZooby", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createContextAlbum("MyMap012", null, "EPHEMERAL", "false", "MapType", "--++", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createContextAlbum("MyMap012", null, "EPHEMERAL", "false", "MapType", "0.0.2", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createContextAlbum("MyMap012", null, "EPHEMERAL", "false", "MapType", "0.0.1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createContextAlbum("MyMap012", null, "EPHEMERAL", "false", "MapType", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createContextAlbum("MyMap002", "0.0.2", "APPLICATION", "true", "MapType", null,
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createContextAlbum("MyMap011", "0.1.2", "APPLICATION", "true", "MapType", "0.0.1",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.deleteContextAlbum("MyMap012", "0.1.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createContextAlbum("MyMap012", "0.1.2", "ZOOBY", "false", "MapType", "0.0.1",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 012");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.validateContextAlbum(null, null);
         assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
@@ -91,84 +91,84 @@
         result = apexModel.updateContextAlbum(null, null, null, null, null, null, null, null);
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updateContextAlbum("MyMap002", "0.0.2", null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateContextAlbum("MyMap002", "0.0.2", "ZOOBY", "true", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateContextAlbum("MyMap002", "0.0.2", null, null, null, null,
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateContextAlbum("MyMap012", null, null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateContextAlbum("MyMap012", null, null, "true", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateContextAlbum("MyMap012", null, "APPLICATION", null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateContextAlbum("MyMap015", null, null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updateContextAlbum("MyMap014", "0.1.5", null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updateContextAlbum("MyMap012", null, "APPLICATION", "false", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateContextAlbum("MyMap012", null, "APPLICATION", "false", "StringType", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateContextAlbum("MyMap012", null, "APPLICATION", "false", "String", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updateContextAlbum("MyMap012", null, "APPLICATION", "false", "StringType", "0.0.2", null,
                 null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updateContextAlbum("MyMap012", null, "APPLICATION", "false", "StringType", "0.0.1", null,
                 null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateContextAlbum("MyMap012", null, "APPLICATION", "Hello", "StringType", "0.0.1", null,
                 null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listContextAlbum("@£%%$", null);
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.listContextAlbum(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listContextAlbum("MyMap012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listContextAlbum("MyMap012", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listContextAlbum("MyMap012", "0.2.5");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listContextAlbum("MyMap014", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteContextAlbum("@£%%$", null);
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.deleteContextAlbum("MyMap012", "0.1.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteContextAlbum("MyMap012oooo", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listContextAlbum("MyMap012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 3);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(3, result.getMessages().size());
 
         result = apexModel.deleteContextAlbum("MyMap012", "0.1.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listContextAlbum("MyMap012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 2);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(2, result.getMessages().size());
 
         result = apexModel.deleteContextAlbum("MyMap012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listContextAlbum("MyMap012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteContextAlbum(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(4, result.getMessages().size());
 
         result = apexModel.listContextAlbum(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(0, result.getMessages().size());
     }
 }
diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiContextSchemaTest.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiContextSchemaTest.java
index 9f29720..04605f4 100644
--- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiContextSchemaTest.java
+++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiContextSchemaTest.java
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2020 Nordix Foundation.
  * ================================================================================
  * 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=========================================================
  */
@@ -21,7 +22,6 @@
 package org.onap.policy.apex.model.modelapi;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 
@@ -41,45 +41,45 @@
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.loadFromFile("src/test/resources/models/PolicyModel.json");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listContextSchemas(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createContextSchema("Hello", "0.0.2", "Java", "java.lang.String",
                 "1fa2e430-f2b2-11e6-bc64-92361f002671", "A description of hello");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createContextSchema("Hello", "0.1.2", "Java", "java.lang.String",
                 "1fa2e430-f2b2-11e6-bc64-92361f002672", "A description of hola");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createContextSchema("Hello", "0.1.4", "Java", "java.lang.String",
                 "1fa2e430-f2b2-11e6-bc64-92361f002672", "A description of connichi wa");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createContextSchema("Hello", null, "Java", "java.lang.String", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createContextSchema("Hello", null, "Java", "java.lang.String", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.deleteContextSchema("Hello", "0.1.4");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createContextSchema("Hello", "0.1.4", "Java", "java.lang.String",
                 "1fa2e430-f2b2-11e6-bc64-92361f002672", "A description of connichi wa");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createContextSchema("Hello2", null, null, "java.lang.String", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createContextSchema("Hello2", null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createContextSchema("Hello2", null, "Java", "java.lang.String", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createContextSchema("Hello", "0.1.2", "Java", "java.lang.Float",
                 "1fa2e430-f2b2-11e6-bc64-92361f002672", "A description of hola");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
 
         result = apexModel.deleteContextSchema("Hello", "0.1.4");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createContextSchema("Hello", "0.1.4", "Java", "java.lang.String",
                 "1fa2e430-f2b2-11e6-bc64-92361f002672", "A description of connichi wa");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.validateContextSchemas(null, null);
         assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
@@ -88,66 +88,66 @@
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.updateContextSchema("Hello", "0.0.2", null, null, null, "An updated description of hello");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateContextSchema("Hello", "0.0.2", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateContextSchema("Hello", "0.1.2", "Java", "java.lang.Integer",
                 "1fa2e430-f2b2-11e6-bc64-92361f002673", "A further updated description of hola");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.updateContextSchema("Hello2", "0.0.2", null, null, null, "An updated description of hello");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listContextSchemas("@£%%$", null);
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.listContextSchemas("Hello", "0.1.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 2);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(2, result.getMessages().size());
 
         result = apexModel.listContextSchemas("Hello", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 4);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(4, result.getMessages().size());
 
         result = apexModel.listContextSchemas(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 9);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(9, result.getMessages().size());
 
         result = apexModel.deleteContextSchema("@£%%$", null);
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.deleteContextSchema("Hello", "0.1.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteContextSchema("Hellooooo", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listContextSchemas("Hello", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 4);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(4, result.getMessages().size());
 
         result = apexModel.deleteContextSchema("Hello", "0.1.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listContextSchemas("Hello", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 3);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(3, result.getMessages().size());
 
         result = apexModel.deleteContextSchema("Hello", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listContextSchemas("Hello", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listContextSchemas(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.deleteContextSchema(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(5, result.getMessages().size());
 
         result = apexModel.listContextSchemas(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(0, result.getMessages().size());
     }
 }
diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiEventTest.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiEventTest.java
index 6bb85a6..bc46ee3 100644
--- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiEventTest.java
+++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiEventTest.java
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2020 Nordix Foundation.
  * ================================================================================
  * 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=========================================================
  */
@@ -21,7 +22,6 @@
 package org.onap.policy.apex.model.modelapi;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 
@@ -41,33 +41,33 @@
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.loadFromFile("src/test/resources/models/PolicyModel.json");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createEvent("MyEvent002", "0.0.2", "My Namespace", "My Source", "my target",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createEvent("MyEvent012", "0.1.2", "My Namespace", "My Source", "my target",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 012");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createEvent("MyEvent012", "0.1.4", "My Namespace", "My Source", "my target",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 014");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createEvent("MyEvent012", null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createEvent("MyEvent012", null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createEvent("MyEvent002", "0.0.2", "My Namespace", "My Source", "my target",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createEvent("@£$%^", "0.2.5", "My Namespace", "My Source", "my target",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.deleteEvent("MyEvent012", "0.1.4");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createEvent("MyEvent012", "0.1.4", "My Namespace", "My Source", "my target",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 014");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.validateEvent(null, null);
         assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
@@ -75,123 +75,123 @@
         result = apexModel.updateContextSchema(null, null, null, null, null, null);
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updateEvent("MyEvent012", "0.1.2", "Another Namespace", null, "Another target", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateEvent("MyEvent002", "0.0.2", "My Namespace", "My Source", "my target",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateEvent("MyEvent012", null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateEvent("MyEvent015", null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updateEvent("MyEvent014", "0.1.5", null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updateEvent("@£$%^^", "0.6.9", null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.listEvent("@£$%", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listEvent(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listEvent("MyEvent012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listEvent("MyEvent012", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listEvent("MyEvent012", "0.2.5");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listEvent("MyEvent123", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteEvent("@£$%^", "0.1.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deleteEvent("MyEvent012", "0.1.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteEvent("MyEvent012oooo", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listEvent("MyEvent012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 3);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(3, result.getMessages().size());
 
         result = apexModel.deleteEvent("MyEvent012", "0.1.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listEvent("MyEvent012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 2);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(2, result.getMessages().size());
 
         result = apexModel.deleteEvent("MyEvent012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listEvent("MyEvent012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createEventPar("MyEvent123", null, "NewPar00", null, null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createEventPar("MyEvent002", "4.5.6", "NewPar00", null, null, true);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createEventPar("MyEvent002", "0.1.4", "NewPar00", null, null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createEventPar("MyEvent002", "0.0.2", "NewPar00", null, null, true);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.createEventPar("MyEvent002", "0.0.2", "NewPar00", "eventContextItem0", null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createEventPar("MyEvent002", "0.0.2", "NewPar00", "eventContextItem0", null, true);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createEventPar("MyEvent002", "0.0.2", "NewPar01", "eventContextItem0", "0.0.1", false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createEventPar("MyEvent002", "0.0.2", "NewPar02", "eventContextItem0", "0.0.2", true);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createEventPar("MyEvent002", null, "NewPar02", "eventContextItem0", null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createEventPar("MyEvent002", null, "NewPar03", "eventContextItem0", null, true);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listEventPar("@£%%$", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listEventPar("MyEvent002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listEventPar("MyEvent002", "0.0.1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listEventPar("MyEvent002", "0.0.2", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listEventPar("MyEvent002", "0.0.2", "NewPar01");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listEventPar("MyEvent002", "0.0.2", "NewPar02");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listEventPar("MyEvent002", "0.0.2", "NewPar04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteEventPar("@££%%%", "0.0.2", "NewPar04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deleteEventPar("NonExistantEvent", "0.0.2", "NewPar04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(4, apexModel.listEventPar("MyEvent002", null, null).getMessages().size());
         result = apexModel.deleteEventPar("MyEvent002", "0.0.2", "NewPar04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(4, apexModel.listEventPar("MyEvent002", null, null).getMessages().size());
         result = apexModel.deleteEventPar("MyEvent002", null, "NewPar02");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(3, apexModel.listEventPar("MyEvent002", null, null).getMessages().size());
         result = apexModel.deleteEventPar("MyEvent002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listEventPar("MyEvent002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deleteEventPar("MyEvent002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listEventPar("MyEvent002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteEvent(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(4, result.getMessages().size());
 
         result = apexModel.listEvent(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(0, result.getMessages().size());
     }
 }
diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiKeyInfoTest.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiKeyInfoTest.java
index 3635abb..caa25e4 100644
--- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiKeyInfoTest.java
+++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiKeyInfoTest.java
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2020 Nordix Foundation.
  * ================================================================================
  * 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=========================================================
  */
@@ -21,7 +22,6 @@
 package org.onap.policy.apex.model.modelapi;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 
@@ -42,28 +42,28 @@
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.loadFromFile("src/test/resources/models/PolicyModel.json");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createKeyInformation(null, null, null, null);
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.createKeyInformation("Hello", "0.0.2", "1fa2e430-f2b2-11e6-bc64-92361f002671",
                 "A description of hello");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createKeyInformation("Hello", "0.1.2", "1fa2e430-f2b2-11e6-bc64-92361f002672",
                 "A description of hola");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createKeyInformation("Hello", "0.1.4", "1fa2e430-f2b2-11e6-bc64-92361f002672",
                 "A description of connichi wa");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createKeyInformation("Hello", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createKeyInformation("Hello", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
 
         result = apexModel.createKeyInformation("Hello", "0.1.2", "1fa2e430-f2b2-11e6-bc64-92361f002672",
                 "A description of hola");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
 
         result = apexModel.validateKeyInformation(null, null);
         assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
@@ -72,15 +72,15 @@
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.updateKeyInformation("Hello", "0.0.2", null, "An updated description of hello");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateKeyInformation("Hello", "0.0.2", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateKeyInformation("Hello", "0.1.2", "1fa2e430-f2b2-11e6-bc64-92361f002673",
                 "A further updated description of hola");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.updateKeyInformation("Hello2", "0.0.2", null, "An updated description of hello");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listKeyInformation(null, null);
         assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
@@ -89,49 +89,49 @@
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.listKeyInformation("Hello", "0.1.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 2);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(2, result.getMessages().size());
 
         result = apexModel.listKeyInformation("Hello", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 4);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(4, result.getMessages().size());
 
         result = apexModel.deleteKeyInformation("Hello", "0.1.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteKeyInformation("Hellooooo", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listKeyInformation("Hello", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 4);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(4, result.getMessages().size());
 
         result = apexModel.listKeyInformation(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 22);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(22, result.getMessages().size());
 
         result = apexModel.deleteKeyInformation("%%%$$", null);
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.deleteKeyInformation("Hello", "0.1.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listKeyInformation("Hello", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 3);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(3, result.getMessages().size());
 
         result = apexModel.deleteKeyInformation("Hello", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listKeyInformation("Hello", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteKeyInformation(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(18, result.getMessages().size());
 
         result = apexModel.listKeyInformation(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(0, result.getMessages().size());
     }
 }
diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiPolicyTest.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiPolicyTest.java
index 515ff80..3e78921 100644
--- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiPolicyTest.java
+++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiPolicyTest.java
@@ -22,7 +22,6 @@
 package org.onap.policy.apex.model.modelapi;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 
@@ -43,983 +42,983 @@
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.loadFromFile("src/test/resources/models/PolicyModel.json");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createPolicy("MyPolicy002", "0.0.2", "SomeTemplate", "AState",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicy("MyPolicy002", "0.0.2", "SomeTemplate", "AState",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createPolicy("MyPolicy012", null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicy("MyPolicy012", null, "SomeTemplate", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicy("MyPolicy013", null, null, "AState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicy("MyPolicy012", null, "SomeTemplate", "AState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicy("MyPolicy002", "0.0.2", "SomeTemplate", "AState",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createPolicy("MyPolicy012", "0.1.2", "SomeTemplate", "AState",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicy("MyTestPolicy", "0.0.1", "SomeTemplate", "TestState",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.deletePolicy("MyPolicy002", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicy("MyPolicy002", "0.0.2", "SomeTemplate", "AState",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.validatePolicy(null, null);
         assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.updatePolicy("@£$$", "0.0.2", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updatePolicy("MyPolicy002", "0.0.2", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicy("MyPolicy002", "0.0.1", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicy("MyPolicy002", "0.0.2", "SomeOtherTemplate", "BState",
                 "1fa2e430-f2b2-11e6-bc64-92361f002700", "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicy("MyPolicy012", null, "SomeOtherTemplate", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicy("MyPolicy012", null, null, "CState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicy("MyPolicy012", null, "SomeOtherTemplate", "BState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicy("MyPolicy015", null, "SomeOtherTemplate", "DState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicy("MyPolicy014", "0.1.5", "SomeOtherTemplate", "EState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listPolicy("@£$%%", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicy(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(6, result.getMessages().size());
         result = apexModel.listPolicy("MyPolicy012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(2, result.getMessages().size());
         result = apexModel.listPolicy("MyPolicy012", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicy("MyPolicy012", "0.2.5");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicy("MyPolicy014", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deletePolicy("@£$%", "0.1.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.deletePolicy("MyPolicy012", "0.1.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deletePolicy("MyPolicy012oooo", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listPolicy("MyPolicy012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 2);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(2, result.getMessages().size());
 
         result = apexModel.deletePolicy("MyPolicy002", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 1);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(1, result.getMessages().size());
 
         result = apexModel.listPolicy("MyPolicy012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 2);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(2, result.getMessages().size());
 
         result = apexModel.deletePolicy("MyPolicy012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 2);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(2, result.getMessages().size());
 
         result = apexModel.createPolicyState(null, null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyState("MyPolicy123", null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyState("MyPolicy123", null, "AState", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", "0.0.2", "AState", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", null, "AState", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", null, "AState", "ATrigger", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", null, "AState", "inEvent", "0.0.2", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", null, "AState", "inEvent", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", null, "AState", "inEvent", "0.0.1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", null, "AState", "inEvent", null, "ATask", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", null, "AState", "inEvent", null, "task", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", null, "AState", "inEvent", null, "task", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", null, "AState", "inEvent", null, "task", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", "0.0.1", "AState", "inEvent", "0.0.1", "task", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", "0.0.1", "BState", "inEvent", "0.0.1", "task", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", "0.0.1", "CState", "inEvent", "0.0.1", "task", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyState("MyTestPolicy", "0.0.1", "DState", "inEvent", "0.0.1", "task", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.updatePolicyState(null, null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updatePolicyState("MyPolicy123", null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updatePolicyState("MyPolicy123", null, "AState", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", "0.0.2", "AState", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", null, "AState", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", null, "ZState", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", null, "AState", "ATrigger", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", null, "AState", "inEvent", "0.0.2", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", null, "AState", "inEvent", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", null, "AState", "inEvent", "0.0.2", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", null, "AState", "inEvent", null, "ATask", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", null, "AState", "inEvent", null, "task", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", null, "AState", "inEvent", null, "task", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", null, "AState", "inEvent", null, "task", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", "0.0.1", "AState", "inEvent", "0.0.1", "task", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", "0.0.1", "BState", "inEvent", "0.0.1", "task", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", "0.0.1", "CState", "inEvent", "0.0.1", "task", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyState("MyTestPolicy", "0.0.1", "DState", "inEvent", "0.0.1", "task", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listPolicyState("MyTestPolicy", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(4, result.getMessages().size());
         result = apexModel.listPolicyState(null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyState("SomeOtherPolicy", "0.0.1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyState("SomeOtherPolicy", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyState("MyTestPolicy", "0.0.2", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyState("MyTestPolicy", "0.0.1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(4, result.getMessages().size());
         result = apexModel.listPolicyState("MyTestPolicy", "0.0.1", "CState");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyState("MyTestPolicy", null, "CState");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyState("MyTestPolicy", "0.0.1", "AState");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyState("MyTestPolicy", "0.0.1", "EState");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deletePolicyState("@£$$", "0.0.2", "Trigger04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         assertEquals(4, apexModel.listPolicyState("MyTestPolicy", null, null).getMessages().size());
         result = apexModel.deletePolicyState("MyTestPolicy", "0.0.2", "Trigger04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(4, apexModel.listPolicyState("MyTestPolicy", null, null).getMessages().size());
         result = apexModel.deletePolicyState("MyTestPolicy", null, "CState");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deletePolicyState("MyTestPolicy", null, "ZState");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(3, apexModel.listPolicyState("MyTestPolicy", null, null).getMessages().size());
         result = apexModel.deletePolicyState("MyTestPolicy", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listPolicyState("MyTestPolicy", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyState("MyTestPolicy", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createPolicyState("MyTestPolicy", "0.0.1", "TestState1", "inEvent", "0.0.1", "task",
                 "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createPolicyState("MyTestPolicy", "0.0.1", "TestState2", "outEvent0", "0.0.1", "task",
                 "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createPolicyState("MyTestPolicy", "0.0.1", "TestState3", "outEvent1", "0.0.1", "task",
                 "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createPolicyStateTaskSelectionLogic(null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateTaskSelectionLogic("MyTestPolicy", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateTaskSelectionLogic("MyTestPolicy", null, "SomeState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateTaskSelectionLogic("MyTestPolicy", "1.2.3", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1", "NewTSL00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1", "UNDEFINED",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1", "MVEL",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
 
         result = apexModel.deletePolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1", "JAVA",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1", "JYTHON",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.deletePolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateTaskSelectionLogic("MyTestPolicy", null, "TestState1", "JAVASCRIPT",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deletePolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateTaskSelectionLogic("MyTestPolicy", null, "TestState1", "JRUBY",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.updatePolicyStateTaskSelectionLogic(null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyTestPolicy", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyTestPolicy", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyTestPolicy", null, "TestState99", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyTestPolicy2", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyTestPolicy1", "0.0.2", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "NonExistantState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1", "",
                 "Some Other Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1", "MVEL",
                 "Some Other Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyPolicy012", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyTestPolicy", null, "TestState1", null,
                 "Some Other Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyTestPolicy", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyPolicy015", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyPolicy014", "0.1.5", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listPolicyStateTaskSelectionLogic(null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateTaskSelectionLogic("zooby", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateTaskSelectionLogic("zooby", null, "looby");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateTaskSelectionLogic("zooby", null, "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateTaskSelectionLogic("MyTestPolicy", null, "looby");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.2", "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateTaskSelectionLogic("MyTestPolicy", null, "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
 
         result = apexModel.deletePolicyStateTaskSelectionLogic(null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateTaskSelectionLogic("zooby", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateTaskSelectionLogic("zooby", null, "looby");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateTaskSelectionLogic("zooby", null, "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateTaskSelectionLogic("MyTestPolicy", null, "looby");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.2", "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listPolicyStateTaskSelectionLogic("MyTestPolicy", null, "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deletePolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyStateTaskSelectionLogic("MyTestPolicy", null, "TestState1", null,
                 "Some Other Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateTaskSelectionLogic("MyTestPolicy", null, "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.createPolicyStateTaskSelectionLogic("MyTestPolicy", null, "TestState1", "JRUBY",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listPolicyStateTaskSelectionLogic("MyTestPolicy", null, "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deletePolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deletePolicyStateTaskSelectionLogic("MyTestPolicy", "0.0.1", "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createPolicyStateOutput(null, null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", null, "SomeState", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", null, "SomeState", "SomeOutput", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "1.2.3", "TestState1", "SomeOutput", null, null,
                 null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState1", "SomeOutput", null, null,
                 null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState1", "SomeOutput",
                 "SomeDummyEvent", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState1", "SomeOutput", "inEvent",
                 "1.2.3", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState1", "SomeOutput", "inEvent",
                 "0.0.1", "SomeDummyNextState");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState1", "SomeOutput", "inEvent",
                 "0.0.1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState1", "SomeOtherOutput", "inEvent",
                 "0.0.1", "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState1", "SomeOtherOutput", "inEvent",
                 "0.0.1", "TestState2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState1", "SomeOtherOutput", "inEvent",
                 "0.0.1", "TestState2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState2", "AnotherOtherOutput",
                 "outEvent0", "0.0.1", "TestState3");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState2", "YetAnotherOtherOutput",
                 "outEvent0", "0.0.1", "TestState3");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listPolicyStateOutput(null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", "0.0.1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", "0.0.2", "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", null, "SomeState", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", "0.0.1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(2, result.getMessages().size());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState2", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(2, result.getMessages().size());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState1", "YetAnotherOtherOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState2", "YetAnotherOtherOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState3", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deletePolicyStateOutput(null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateOutput("MyTestPolicy", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateOutput("MyTestPolicy", "0.0.1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateOutput("MyTestPolicy", "0.0.2", "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateOutput("MyTestPolicy", null, "SomeState", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateOutput("MyTestPolicy", "0.0.1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateOutput("MyTestPolicy", "0.0.1", "TestState3", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateOutput("MyTestPolicy", "0.0.1", "TestState3", "DummyOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", null, "TestState1", null);
         assertEquals(2, result.getMessages().size());
         result = apexModel.deletePolicyStateOutput("MyTestPolicy", null, "TestState1", "SomeOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", null, "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.deletePolicyStateOutput("MyTestPolicy", null, "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", null, "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", null, "TestState2", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(2, result.getMessages().size());
         result = apexModel.deletePolicyStateOutput("MyTestPolicy", null, "TestState2", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(2, result.getMessages().size());
         result = apexModel.listPolicyStateOutput("MyTestPolicy", null, "TestState2", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState1", "SomeOutput", "inEvent",
                 "0.0.1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState1", "SomeOtherOutput", "inEvent",
                 "0.0.1", "TestState1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState1", "SomeOtherOutput", "inEvent",
                 "0.0.1", "TestState2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState2", "AnotherOtherOutput",
                 "outEvent0", "0.0.1", "TestState3");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateOutput("MyTestPolicy", "0.0.1", "TestState2", "YetAnotherOtherOutput",
                 "outEvent0", "0.0.1", "TestState3");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createPolicyStateFinalizerLogic(null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", null, "SomeState", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", null, "SomeState", "SFLName01", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", "1.2.3", "TestState1", "SFLName01", null,
                 null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName01", null,
                 null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName01",
                 "NewTSL00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName02",
                 "UNDEFINED", "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName03", "MVEL",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName03", "MVEL",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName04", "JAVA",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName05", "JYTHON",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", "SFLName06",
                 "JAVASCRIPT", "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", "SFLName07", "JRUBY",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.updatePolicyStateFinalizerLogic(null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyTestPolicy", null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyTestPolicy", null, "TestState99", "SomeSFLName", null,
                 null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyTestPolicy2", null, "TestState1", "SomeSFLName", null,
                 null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyTestPolicy1", "0.0.2", "TestState1", "SomeSFLName", null,
                 null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "NonEistantSFL", null,
                 null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName06", null,
                 null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName06", "",
                 "Some Other Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName06", "MVEL",
                 "Some Other Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyPolicy012", null, "TestState1", "SFLName06", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", "SFLName06", null,
                 "Some Other Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", "SFLName06", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyPolicy015", null, "TestState1", "SFLName06", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updatePolicyStateFinalizerLogic("MyPolicy014", "0.1.5", "TestState1", "SFLName06", null,
                 null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listPolicyStateFinalizerLogic(null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", "0.0.2", "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", null, "SomeState", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("zooby", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("zooby", null, "looby", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("zooby", null, "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", null, "looby", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", "0.0.2", "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(6, result.getMessages().size());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", "SFLName06");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
 
         result = apexModel.deletePolicyStateFinalizerLogic(null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateFinalizerLogic("MyTestPolicy", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateFinalizerLogic("MyTestPolicy", "0.0.2", "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateFinalizerLogic("MyTestPolicy", null, "SomeState", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateFinalizerLogic("zooby", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateFinalizerLogic("zooby", null, "looby", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateFinalizerLogic("zooby", null, "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateFinalizerLogic("MyTestPolicy", null, "looby", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateFinalizerLogic("MyTestPolicy", "0.0.2", "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName06");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deletePolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName06");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", "SFLName06");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(5, result.getMessages().size());
         result = apexModel.deletePolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName02");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deletePolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName02");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", "SFLName02");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(4, result.getMessages().size());
         result = apexModel.deletePolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(4, result.getMessages().size());
         result = apexModel.deletePolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName02",
                 "UNDEFINED", "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName03", "MVEL",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName04", "JAVA",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", "0.0.1", "TestState1", "SFLName05", "JYTHON",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", "SFLName06",
                 "JAVASCRIPT", "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateFinalizerLogic("MyTestPolicy", null, "TestState1", "SFLName07", "JRUBY",
                 "Some Policy Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createTask("TestTask0", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTask("TestTask1", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTask("TestTask2", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTask("TestTask3", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTask("TestTask4", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createPolicyStateTaskRef(null, null, null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, null, null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "SomeState", null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "SomeState", null, null, null, null,
                 "DummyOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", "1.2.3", "SomeState", null, null, null, null,
                 "DummyOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateTaskRef("AnyOldPolicy", "1.2.3", "SomeState", null, null, null, null,
                 "DummyOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", "0.0.1", "TestState1", "SomeTaskLocalName", null,
                 null, null, "DummyOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", "0.0.1", "TestState1", "SomeTaskLocalName",
                 "SomeTask", "Zooby|", null, "DummyOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", "0.0.1", "TestState1", "SomeTaskLocalName",
                 "SomeTask", "0.0.1", null, "DummyOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", "0.0.1", "TestState1", "SomeTaskLocalName", "task",
                 "0.0.1", null, "DummyOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", "0.0.1", "TestState1", "SomeTaskLocalName", "task",
                 "0.0.1", "Some Policy Logic", "DummyOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", "0.0.1", "TestState1", "SomeTaskLocalName", "task",
                 "0.0.1", "DIRECT", "DummyOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", "0.0.1", "TestState1", "SomeTaskLocalName", "task",
                 "0.0.1", "LOGIC", "DummyOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "SomeTaskLocalName", "task",
                 "0.0.1", "DIRECT", "SFLName07");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "SomeTaskLocalName", "task",
                 "0.0.1", "LOGIC", "SomeOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "SomeTaskLocalName", "task",
                 "0.0.1", "DIRECT", "SomeOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "SomeTaskLocalName",
                 "NonExistantTask", "0.0.1", "DIRECT", "SomeOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "SomeTaskLocalName", "task",
                 "0.0.1", "LOGIC", "SFLName07");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "SomeTaskLocalName",
                 "TestTask0", "0.0.1", "LOGIC", "SFLName07");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "SomeTaskLocalName",
                 "TestTask1", "0.0.1", "DIRECT", "SomeOtherOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "SomeTaskLocalName",
                 "TestTask2", "0.0.1", "LOGIC", "SFLName07");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "SomeTaskLocalName",
                 "TestTask3", "0.0.1", "DIRECT", "SomeOtherOutput");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", null, "TestTask4", "0.0.1",
                 "LOGIC", "SFLName07");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", null, "TestTask4", "0.0.1",
                 "LOGIC", "SFLName07");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", null, "TestState1", "TestTask4", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "SomeTaskLocalName",
                 "TestTask4", "0.0.1", "FUNKY", "SFLName07");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "SomeTaskLocalName",
                 "TestTask4", "0.0.1", "UNDEFINED", "SFLName07");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "SomeTaskLocalName",
                 "TestTask4", "0.0.1", "LOGIC", "SFLName07");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateTaskRef("MyTestPolicy", null, "TestState1", null, "TestTask0", "0.0.1",
                 "LOGIC", "SFLName07");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
 
         result = apexModel.listPolicyStateTaskRef(null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", "0.0.1", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", "0.0.2", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", null, "SomeState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", "0.0.1", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateTaskRef("zooby", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateTaskRef("zooby", null, "looby", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateTaskRef("zooby", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", null, "looby", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", "0.0.2", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(12, result.getMessages().size());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "SomeOldTask", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "task", "1.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "task", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(2, result.getMessages().size());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", null, "TestState1", "task", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(2, result.getMessages().size());
 
         result = apexModel.deletePolicyStateTaskRef(null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", "0.0.1", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", "0.0.2", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", null, "SomeState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", "0.0.1", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("zooby", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("zooby", null, "looby", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("zooby", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", null, "looby", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", "0.0.2", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", "0.0.2", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", "0.0.1", "TestState1", "ADummyTask", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", "0.0.1", "TestState1", "task", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(12, result.getMessages().size());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", null, "TestState1", "TestTask0", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(10, result.getMessages().size());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", null, "TestState1", "TestTask2", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(8, result.getMessages().size());
         result = apexModel.deletePolicyStateTaskRef("MyTestPolicy", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(4, result.getMessages().size());
         result = apexModel.listPolicyStateTaskRef("MyTestPolicy", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createPolicyStateContextRef(null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", null, "SomeState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", null, "SomeState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "1.2.3", "SomeState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateContextRef("AnyOldPolicy", "1.2.3", "SomeState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "SomeTask", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "SomeTask", "Zooby|");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "SomeTask", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "task", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyPolicy123", null, null, "AContextMap00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyPolicy123", null, "TestState1", "AContextMap00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "4.5.6", "TestState1", "AContextMap00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.1.4", "TestState1", "AContextMap00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "AContextMap00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum0", "");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum0", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum0", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum0", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum0", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum0", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", null, "TestState1", "contextAlbum0", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
 
         result = apexModel.listPolicyStateContextRef(null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", "0.0.1", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", "0.0.2", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", null, "SomeState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", "0.0.1", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateContextRef("zooby", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateContextRef("zooby", null, "looby", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateContextRef("zooby", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", null, "looby", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", "0.0.2", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(2, result.getMessages().size());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", "0.0.2", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(2, result.getMessages().size());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum0", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum0", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum0", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "AContextMap04", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum0", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum0", "1.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deletePolicyStateContextRef(null, null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", "0.0.1", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", "0.0.2", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", null, "SomeState", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", "0.0.1", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateContextRef("zooby", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateContextRef("zooby", null, "looby", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateContextRef("zooby", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", null, "looby", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", "0.0.2", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", "0.0.2", "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "ADummyContextMap", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum0", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", null, null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "AContextMap04", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", null, "TestState1", "contextAlbum0", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", null, "TestState1", "contextAlbum0", "0.1.5");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", null, "TestState1", "contextAlbum1", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.createPolicyStateContextRef("MyTestPolicy", "0.0.1", "TestState1", "contextAlbum0", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deletePolicyStateContextRef("MyTestPolicy", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listPolicyStateContextRef("MyTestPolicy", null, "TestState1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deletePolicy(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(3, result.getMessages().size());
 
         result = apexModel.listPolicy(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(0, result.getMessages().size());
     }
 }
diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiTaskTest.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiTaskTest.java
index 0500255..f2c4131 100644
--- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiTaskTest.java
+++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexEditorApiTaskTest.java
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2020 Nordix Foundation.
  * ================================================================================
  * 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=========================================================
  */
@@ -21,7 +22,6 @@
 package org.onap.policy.apex.model.modelapi;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 
@@ -41,445 +41,445 @@
         assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.loadFromFile("src/test/resources/models/PolicyModel.json");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.createTask("@^^$^^$", "0.0.2", "1fa2e430-f2b2-11e6-bc64-92361f002700",
                 "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createTask("MyTask002", "0.0.2", "1fa2e430-f2b2-11e6-bc64-92361f002700",
                 "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTask("MyTask002", "0.0.2", "1fa2e430-f2b2-11e6-bc64-92361f002700",
                 "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createTask("MyTask012", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTask("MyTask012", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.listTask(null, null);
         result = apexModel.createTask("MyTask002", "0.0.2", "1fa2e430-f2b2-11e6-bc64-92361f002700",
                 "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createTask("MyTask012", "0.1.2", "1fa2e430-f2b2-11e6-bc64-92361f002700",
                 "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.deleteTask("MyTask002", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTask("MyTask002", "0.0.2", "1fa2e430-f2b2-11e6-bc64-92361f002700",
                 "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.validateTask(null, null);
         assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.updateTask("@$$$£", "0.0.2", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updateTask("MyTask002", "0.0.2", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateTask("MyTask002", "0.0.1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updateTask("MyTask002", "0.0.2", "1fa2e430-f2b2-11e6-bc64-92361f002700",
                 "A description of 002");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateTask("MyTask012", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateTask("MyTask012", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateTask("MyTask012", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateTask("MyTask015", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updateTask("MyTask014", "0.1.5", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listTask("£@£@@£@£", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listTask(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTask("MyTask012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTask("MyTask012", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTask("MyTask012", "0.2.5");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listTask("MyTask014", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteTask("@£££@", "0.1.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deleteTask("MyTask012", "0.1.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deleteTask("MyTask012oooo", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listTask("MyTask012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 2);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(2, result.getMessages().size());
 
         result = apexModel.deleteTask("MyTask012", "0.1.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listTask("MyTask012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
-        assertTrue(result.getMessages().size() == 1);
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
+        assertEquals(1, result.getMessages().size());
 
         result = apexModel.deleteTask("MyTask012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listTask("MyTask012", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.updateTaskLogic("MyTask002", null, "NewLogic00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskLogic("MyTask123", null, "NewLogic00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createTaskLogic("MyTask002", "4.5.6", "NewLogic00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createTaskLogic("MyTask002", "0.1.4", "NewLogic00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createTaskLogic("MyTask002", "0.0.2", "NewLogic00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createTaskLogic("MyTask002", "0.0.2", "UNDEFINED", "Some Task Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskLogic("MyTask002", "0.0.2", "MVEL", "Some Task Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.deleteTaskLogic("MyTask002", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskLogic("MyTask002", "0.0.2", "JAVA", "Some Task Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskLogic("MyTask002", "0.0.2", "JYTHON", "Some Task Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.deleteTaskLogic("MyTask002", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskLogic("MyTask002", null, "JAVASCRIPT", "Some Task Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deleteTaskLogic("MyTask002", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskLogic("MyTask002", null, "JRUBY", "Some Task Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.updateTaskLogic("MyTask002", "0.0.2", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateTaskLogic("MyTask002", "0.0.1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updateTaskLogic("MyTask002", "0.0.2", "", "Some Other Task Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.updateTaskLogic("MyTask002", "0.0.2", "MVEL", "Some Other Task Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateTaskLogic("MyTask012", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updateTaskLogic("MyTask002", null, null, "Some Other Task Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateTaskLogic("MyTask002", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.updateTaskLogic("MyTask015", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.updateTaskLogic("MyTask014", "0.1.5", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.listTaskLogic("MyTask002", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskLogic("MyTask002", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listTaskLogic("MyTask002", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskLogic("MyTask002", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskLogic("MyTask002", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskLogic(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.deleteTaskLogic("@£@£@£", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deleteTaskLogic("NonExistantTask", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         assertEquals(1, apexModel.listTaskLogic("MyTask002", null).getMessages().size());
         result = apexModel.deleteTaskLogic("MyTask002", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskLogic("MyTask002", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deleteTaskLogic("MyTask002", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(1, apexModel.listTaskLogic("MyTask002", null).getMessages().size());
         result = apexModel.createTaskLogic("MyTask002", null, "JRUBY", "Some Task Logic");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskLogic("MyTask002", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deleteTaskLogic("MyTask002", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.deleteTaskLogic("MyTask002", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskInputField("MyTask123", null, "NewField00", null, null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskInputField("MyTask002", "4.5.6", "NewField00", null, null, true);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskInputField("MyTask002", "0.1.4", "NewField00", null, null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskInputField("MyTask002", "0.0.2", "NewField00", null, null, true);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.createTaskInputField("MyTask002", "0.0.2", "NewField00", "eventContextItem0", null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskInputField("MyTask002", "0.0.2", "NewField00", "eventContextItem0", null, true);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createTaskInputField("MyTask002", "0.0.2", "NewField01", "eventContextItem0", "0.0.1",
                 false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskInputField("MyTask002", "0.0.2", "NewField02", "eventContextItem0", "0.0.2", true);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createTaskInputField("MyTask002", null, "NewField02", "eventContextItem0", null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskInputField("MyTask002", null, "NewField03", "eventContextItem0", null, true);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listTaskInputField("@£$%", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listTaskInputField("MyTask002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskInputField("MyTask002", "0.0.1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listTaskInputField("MyTask002", "0.0.2", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskInputField("MyTask002", "0.0.2", "NewField01");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskInputField("MyTask002", "0.0.2", "NewField02");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskInputField("MyTask002", "0.0.2", "NewField04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteTaskInputField("@£$%", "0.0.2", "NewField04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deleteTaskInputField("NonExistantTask", "0.0.2", "NewField04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(4, apexModel.listTaskInputField("MyTask002", null, null).getMessages().size());
         result = apexModel.deleteTaskInputField("MyTask002", "0.0.2", "NewField04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(4, apexModel.listTaskInputField("MyTask002", null, null).getMessages().size());
         result = apexModel.deleteTaskInputField("MyTask002", null, "NewField02");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(3, apexModel.listTaskInputField("MyTask002", null, null).getMessages().size());
         result = apexModel.deleteTaskInputField("MyTask002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskInputField("MyTask002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deleteTaskInputField("MyTask002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskOutputField("MyTask123", null, "NewField00", null, null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskOutputField("MyTask002", "4.5.6", "NewField00", null, null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskOutputField("MyTask002", "0.1.4", "NewField00", null, null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskOutputField("MyTask002", "0.0.2", "NewField00", null, null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.createTaskOutputField("MyTask002", "0.0.2", "NewField00", "eventContextItem0", null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskOutputField("MyTask002", "0.0.2", "NewField00", "eventContextItem0", null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createTaskOutputField("MyTask002", "0.0.2", "NewField01", "eventContextItem0", "0.0.1",
                 false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskOutputField("MyTask002", "0.0.2", "NewField02", "eventContextItem0", "0.0.2",
                 false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createTaskOutputField("MyTask002", null, "NewField02", "eventContextItem0", null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskOutputField("MyTask002", null, "NewField03", "eventContextItem0", null, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.listTaskOutputField("@£$%", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listTaskOutputField("MyTask002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskOutputField("MyTask002", "0.0.1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listTaskOutputField("MyTask002", "0.0.2", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskOutputField("MyTask002", "0.0.2", "NewField01");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskOutputField("MyTask002", "0.0.2", "NewField02");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskOutputField("MyTask002", "0.0.2", "NewField04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteTaskOutputField("@£$%", "0.0.2", "NewField04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deleteTaskOutputField("NonExistantTask", "0.0.2", "NewField04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(4, apexModel.listTaskOutputField("MyTask002", null, null).getMessages().size());
         result = apexModel.deleteTaskOutputField("MyTask002", "0.0.2", "NewField04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(4, apexModel.listTaskOutputField("MyTask002", null, null).getMessages().size());
         result = apexModel.deleteTaskOutputField("MyTask002", null, "NewField02");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(3, apexModel.listTaskOutputField("MyTask002", null, null).getMessages().size());
         result = apexModel.deleteTaskOutputField("MyTask002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskOutputField("MyTask002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deleteTaskOutputField("MyTask002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskParameter("MyTask123", null, "NewPar00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskParameter("MyTask002", "4.5.6", "NewPar00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskParameter("MyTask002", "0.1.4", "NewPar00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskParameter("MyTask002", "0.0.2", "NewPar00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.createTaskParameter("MyTask002", "0.0.2", "NewPar00", "eventContextItem0");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskParameter("MyTask002", "0.0.2", "NewPar00", "eventContextItem0");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createTaskParameter("MyTask002", "0.0.2", "NewPar01", "eventContextItem0");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskParameter("MyTask002", "0.0.2", "NewPar02", "eventContextItem0");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskParameter("MyTask002", "0.0.2", "NewPar02", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createTaskParameter("MyTask002", "0.0.2", "NewPar03", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createTaskParameter("MyTask002", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createTaskParameter("MyTask002", null, null, "Default value");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.listTaskParameter("@£$%", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listTaskParameter("MyTask002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskParameter("MyTask002", "0.0.3", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listTaskParameter("MyTask002", "0.0.2", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskParameter("MyTask002", "0.0.2", "NewPar01");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskParameter("MyTask002", "0.0.2", "NewPar02");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskParameter("MyTask002", "0.0.2", "NewPar04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteTaskParameter("@£$%", "0.0.2", "NewPar04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deleteTaskParameter("NonExistantTask", "0.0.2", "NewPar04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(3, apexModel.listTaskParameter("MyTask002", null, null).getMessages().size());
         result = apexModel.deleteTaskParameter("MyTask002", "0.0.2", "NewPar04");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(3, apexModel.listTaskParameter("MyTask002", null, null).getMessages().size());
         result = apexModel.deleteTaskParameter("MyTask002", null, "NewPar02");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(2, apexModel.listTaskParameter("MyTask002", null, null).getMessages().size());
         result = apexModel.deleteTaskParameter("MyTask002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.listTaskParameter("MyTask002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deleteTaskParameter("MyTask002", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskContextRef("@£$$", null, "AContextMap00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.createTaskContextRef("MyTask123", null, "AContextMap00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createTaskContextRef("MyTask123", null, "AContextMap00", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createTaskContextRef("MyTask123", null, "AContextMap00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createTaskContextRef("MyTask002", "4.5.6", "AContextMap00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createTaskContextRef("MyTask002", "0.1.4", "AContextMap00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createTaskContextRef("MyTask002", "0.0.2", "AContextMap00", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createTaskContextRef("MyTask002", "0.0.2", "contextAlbum2", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.createTaskContextRef("MyTask002", "0.0.2", "contextAlbum0", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.createTaskContextRef("MyTask002", "0.0.2", "contextAlbum0", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskContextRef("MyTask002", "0.0.2", "contextAlbum0", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createTaskContextRef("MyTask002", "0.0.2", "contextAlbum1", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         result = apexModel.createTaskContextRef("MyTask002", "0.0.2", "contextAlbum0", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
         result = apexModel.createTaskContextRef("MyTask002", null, "contextAlbum0", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_EXISTS));
+        assertEquals(ApexApiResult.Result.CONCEPT_EXISTS, result.getResult());
 
         result = apexModel.listTaskContextRef("@£$%", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.listTaskContextRef("MyTask002", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(2, result.getMessages().size());
         result = apexModel.listTaskContextRef("MyTask002", "0.0.1", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listTaskContextRef("MyTask002", "0.0.2", null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(2, result.getMessages().size());
         result = apexModel.listTaskContextRef("MyTask002", "0.0.2", "contextAlbum0", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listTaskContextRef("MyTask002", "0.0.2", "contextAlbum0", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listTaskContextRef("MyTask002", "0.0.2", "contextAlbum0", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listTaskContextRef("MyTask002", "0.0.2", "AContextMap04", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.listTaskContextRef("MyTask002", "0.0.2", "contextAlbum0", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listTaskContextRef("MyTask002", "0.0.2", "contextAlbum1", "0.0.1");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listTaskContextRef("MyTask002", "0.0.2", "contextAlbum1", "0.0.2");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteTaskContextRef("@£$%", "0.0.2", "AContextMap04", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
         result = apexModel.deleteTaskContextRef("NonExistantTask", "0.0.2", "AContextMap04", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         assertEquals(2, apexModel.listTaskContextRef("MyTask002", null, null, null).getMessages().size());
         result = apexModel.deleteTaskContextRef("MyTask002", "0.0.2", "AContextMap04", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deleteTaskContextRef("MyTask002", null, "contextAlbum0", "0.0.3");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deleteTaskContextRef("MyTask002", null, "contextAlbum0", "0.1.5");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
         result = apexModel.deleteTaskContextRef("MyTask002", null, "contextAlbum0", null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.deleteTaskContextRef("MyTask002", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(1, result.getMessages().size());
         result = apexModel.listTaskContextRef("MyTask002", null, null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST));
+        assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult());
 
         result = apexModel.deleteTask(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(2, result.getMessages().size());
 
         result = apexModel.listTask(null, null);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         assertEquals(0, result.getMessages().size());
     }
 }
diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexModelApiTest.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexModelApiTest.java
index f8d7fd6..e7330ee 100644
--- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexModelApiTest.java
+++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexModelApiTest.java
@@ -64,23 +64,23 @@
         final ApexModel apexModel = new ApexModelFactory().createApexModel(null, false);
 
         ApexApiResult result = apexModel.loadFromFile("src/main/resources/models/PolicyModel.json");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.loadFromFile("src/test/resources/models/PolicyModel.json");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.deleteModel();
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.loadFromFile("src/test/resources/models/PolicyModel.xml");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.deleteModel();
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.loadFromFile("src/test/resources/models/PolicyModel.junk");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
-        assertTrue(result.getMessages().get(0).equals("format of input for Apex concept is neither JSON nor XML"));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
+        assertEquals("format of input for Apex concept is neither JSON nor XML", result.getMessages().get(0));
     }
 
     @Test
@@ -88,24 +88,24 @@
         final ApexModel apexModel = new ApexModelFactory().createApexModel(null, false);
 
         ApexApiResult result = apexModel.loadFromFile("src/test/resources/models/PolicyModel.json");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         final File tempJsonModelFile = File.createTempFile("ApexModelTest", ".json");
         result = apexModel.saveToFile(tempJsonModelFile.getCanonicalPath(), false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         final ApexModel jsonApexModel = new ApexModelFactory().createApexModel(null, false);
         result = jsonApexModel.loadFromFile(tempJsonModelFile.getCanonicalPath());
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         tempJsonModelFile.delete();
 
         final File tempXmlModelFile = File.createTempFile("ApexModelTest", ".xml");
         result = apexModel.saveToFile(tempXmlModelFile.getCanonicalPath(), true);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         final ApexModel xmlApexModel = new ApexModelFactory().createApexModel(null, false);
         result = xmlApexModel.loadFromFile(tempXmlModelFile.getCanonicalPath());
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
         tempXmlModelFile.delete();
     }
 
@@ -114,32 +114,32 @@
         final ApexModel apexModel = new ApexModelFactory().createApexModel(null, false);
 
         ApexApiResult result = apexModel.loadFromFile("src/test/resources/models/PolicyModel.json");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         final DaoParameters DaoParameters = new DaoParameters();
         DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
         DaoParameters.setPersistenceUnit("DAOTest");
 
         result = apexModel.saveToDatabase(DaoParameters);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.deleteModel();
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.loadFromDatabase("PolicyModel", "0.0.1", DaoParameters);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.deleteModel();
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.loadFromDatabase("PolicyModel", null, DaoParameters);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.deleteModel();
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.loadFromDatabase("VPNPolicyModel", "0.0.1", DaoParameters);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
     }
 
     @Test
@@ -163,30 +163,30 @@
         }
 
         result = apexModel.readFromUrl("zooby/looby");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.writeToUrl("zooby/looby", true);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.readFromUrl("zooby://zooby/looby");
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         result = apexModel.writeToUrl("zooby://zooby/looby", false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
 
         apexModel = new ApexModelFactory().createApexModel(null, false);
 
         final File tempJsonModelFile = File.createTempFile("ApexModelTest", ".json");
         result = apexModel.saveToFile(tempJsonModelFile.getCanonicalPath(), false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         final String tempFileUrlString = tempJsonModelFile.toURI().toString();
         result = apexModel.readFromUrl(tempFileUrlString);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.SUCCESS));
+        assertEquals(ApexApiResult.Result.SUCCESS, result.getResult());
 
         result = apexModel.writeToUrl(tempFileUrlString, false);
-        assertTrue(result.getResult().equals(ApexApiResult.Result.FAILED));
-        assertTrue(result.getMessages().get(0).equals("protocol doesn't support output"));
+        assertEquals(ApexApiResult.Result.FAILED, result.getResult());
+        assertEquals("protocol doesn't support output", result.getMessages().get(0));
 
         tempJsonModelFile.delete();
     }
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java
index d3d5334..655df05 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/LogicTest.java
@@ -1,20 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- *  Modifications Copyright (C) 2019 Nordix Foundation.
+ *  Modifications Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * 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=========================================================
  */
@@ -22,10 +22,8 @@
 package org.onap.policy.apex.model.policymodel.concepts;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import org.junit.Test;
@@ -36,7 +34,7 @@
 
 /**
  * Test apex logic.
- * 
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 public class LogicTest {
@@ -154,16 +152,16 @@
                         + "parentLocalName=PLN,localName=LN),logicFlavour=LogicFlavour,logic=Logic)",
                         clonedLogic.toString());
 
-        assertFalse(logic.hashCode() == 0);
+        assertNotEquals(0, logic.hashCode());
 
-        assertTrue(logic.equals(logic));
-        assertTrue(logic.equals(clonedLogic));
-        assertFalse(logic.equals(null));
-        assertFalse(logic.equals((Object) "Hello"));
-        assertFalse(logic.equals(new AxLogic(AxReferenceKey.getNullKey(), "LogicFlavour", "Logic")));
-        assertFalse(logic.equals(new AxLogic(logicKey, "AnotherLogicFlavour", "Logic")));
-        assertFalse(logic.equals(new AxLogic(logicKey, "LogicFlavour", "AnotherLogic")));
-        assertTrue(logic.equals(new AxLogic(logicKey, "LogicFlavour", "Logic")));
+        assertEquals(logic, logic);
+        assertEquals(logic, clonedLogic);
+        assertNotNull(logic);
+        assertNotEquals(logic, (Object) "Hello");
+        assertNotEquals(logic, new AxLogic(AxReferenceKey.getNullKey(), "LogicFlavour", "Logic"));
+        assertNotEquals(logic, new AxLogic(logicKey, "AnotherLogicFlavour", "Logic"));
+        assertNotEquals(logic, new AxLogic(logicKey, "LogicFlavour", "AnotherLogic"));
+        assertEquals(logic, new AxLogic(logicKey, "LogicFlavour", "Logic"));
 
         assertEquals(0, logic.compareTo(logic));
         assertEquals(0, logic.compareTo(clonedLogic));
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java
index 084623f..662b8bd 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java
@@ -23,10 +23,8 @@
 
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 
 import java.util.Map;
 import java.util.TreeMap;
@@ -40,7 +38,7 @@
 
 /**
  * Test apex policies.
- * 
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 public class PoliciesTest {
@@ -210,18 +208,18 @@
         assertEquals("AxPolicy:(key=AxArtifactKey:(name=policy,version=0.0.1),template=FREEFORM,sta",
                         clonedPolicy.toString().substring(0, 77));
 
-        assertFalse(policyPN.hashCode() == 0);
+        assertNotEquals(0, policyPN.hashCode());
 
-        assertTrue(policyPN.equals(policyPN));
-        assertTrue(policyPN.equals(clonedPolicy));
-        assertFalse(policyPN.equals(null));
-        assertFalse(policyPN.equals((Object) "Hello"));
-        assertFalse(policyPN.equals(
-                        new AxPolicy(AxArtifactKey.getNullKey(), savedTemplate, savedStateMap, savedFirstState)));
-        assertFalse(policyPN.equals(new AxPolicy(savedPolicyKey, "SomeTemplate", savedStateMap, savedFirstState)));
-        assertFalse(policyPN.equals(new AxPolicy(savedPolicyKey, savedTemplate, stateMapEmpty, savedFirstState)));
-        assertFalse(policyPN.equals(new AxPolicy(savedPolicyKey, savedTemplate, savedStateMap, "SomeFirstState")));
-        assertTrue(policyPN.equals(new AxPolicy(savedPolicyKey, savedTemplate, savedStateMap, savedFirstState)));
+        assertEquals(policyPN, policyPN);
+        assertEquals(policyPN, clonedPolicy);
+        assertNotNull(policyPN);
+        assertNotEquals(policyPN, (Object) "Hello");
+        assertNotEquals(policyPN,
+                        new AxPolicy(AxArtifactKey.getNullKey(), savedTemplate, savedStateMap, savedFirstState));
+        assertNotEquals(policyPN, new AxPolicy(savedPolicyKey, "SomeTemplate", savedStateMap, savedFirstState));
+        assertNotEquals(policyPN, new AxPolicy(savedPolicyKey, savedTemplate, stateMapEmpty, savedFirstState));
+        assertNotEquals(policyPN, new AxPolicy(savedPolicyKey, savedTemplate, savedStateMap, "SomeFirstState"));
+        assertEquals(policyPN, new AxPolicy(savedPolicyKey, savedTemplate, savedStateMap, savedFirstState));
 
         assertEquals(0, policyPN.compareTo(policyPN));
         assertEquals(0, policyPN.compareTo(clonedPolicy));
@@ -295,13 +293,13 @@
         assertEquals("AxPolicies:(key=AxArtifactKey:(name=PoliciesKey,version=0.0.",
                         clonedPolicies.toString().substring(0, 60));
 
-        assertFalse(policies.hashCode() == 0);
+        assertNotEquals(0, policies.hashCode());
 
-        assertTrue(policies.equals(policies));
-        assertTrue(policies.equals(clonedPolicies));
-        assertFalse(policies.equals(null));
-        assertFalse(policies.equals((Object) "Hello"));
-        assertFalse(policies.equals(new AxPolicies(new AxArtifactKey())));
+        assertEquals(policies, policies);
+        assertEquals(policies, clonedPolicies);
+        assertNotNull(policies);
+        assertNotEquals(policies, (Object) "Hello");
+        assertNotEquals(policies, new AxPolicies(new AxArtifactKey()));
 
         assertEquals(0, policies.compareTo(policies));
         assertEquals(0, policies.compareTo(clonedPolicies));
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java
index 820f2d1..829f933 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java
@@ -1,20 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- *  Modifications Copyright (C) 2019 Nordix Foundation.
+ *  Modifications Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * 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=========================================================
  */
@@ -22,10 +22,8 @@
 package org.onap.policy.apex.model.policymodel.concepts;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -44,7 +42,7 @@
 
 /**
  * Test policy models.
- * 
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 public class PolicyModelTest {
@@ -79,36 +77,36 @@
 
         final AxPolicyModel clonedModel = new AxPolicyModel(model);
 
-        assertFalse(model.hashCode() == 0);
+        assertNotEquals(0, model.hashCode());
 
-        assertTrue(model.equals(model));
-        assertTrue(model.equals(clonedModel));
-        assertFalse(model.equals((Object) "Hello"));
-        assertFalse(model.equals(new AxPolicyModel(new AxArtifactKey())));
-        assertFalse(model.equals(new AxPolicyModel(AxArtifactKey.getNullKey(), new AxContextSchemas(schemasKey),
+        assertEquals(model, model);
+        assertEquals(model, clonedModel);
+        assertNotEquals(model, (Object) "Hello");
+        assertNotEquals(model, new AxPolicyModel(new AxArtifactKey()));
+        assertNotEquals(model, new AxPolicyModel(AxArtifactKey.getNullKey(), new AxContextSchemas(schemasKey),
                         new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey), new AxContextAlbums(albumsKey),
-                        new AxTasks(tasksKey), new AxPolicies(policiesKey))));
-        assertFalse(model.equals(new AxPolicyModel(modelKey, new AxContextSchemas(), new AxKeyInformation(keyInfoKey),
+                        new AxTasks(tasksKey), new AxPolicies(policiesKey)));
+        assertNotEquals(model, new AxPolicyModel(modelKey, new AxContextSchemas(), new AxKeyInformation(keyInfoKey),
                         new AxEvents(eventsKey), new AxContextAlbums(albumsKey), new AxTasks(tasksKey),
-                        new AxPolicies(policiesKey))));
-        assertFalse(model.equals(new AxPolicyModel(modelKey, new AxContextSchemas(schemasKey), new AxKeyInformation(),
+                        new AxPolicies(policiesKey)));
+        assertNotEquals(model, new AxPolicyModel(modelKey, new AxContextSchemas(schemasKey), new AxKeyInformation(),
                         new AxEvents(eventsKey), new AxContextAlbums(albumsKey), new AxTasks(tasksKey),
-                        new AxPolicies(policiesKey))));
-        assertFalse(model.equals(new AxPolicyModel(modelKey, new AxContextSchemas(schemasKey),
+                        new AxPolicies(policiesKey)));
+        assertNotEquals(model, new AxPolicyModel(modelKey, new AxContextSchemas(schemasKey),
                         new AxKeyInformation(keyInfoKey), new AxEvents(), new AxContextAlbums(albumsKey),
-                        new AxTasks(tasksKey), new AxPolicies(policiesKey))));
-        assertFalse(model.equals(new AxPolicyModel(modelKey, new AxContextSchemas(schemasKey),
+                        new AxTasks(tasksKey), new AxPolicies(policiesKey)));
+        assertNotEquals(model, new AxPolicyModel(modelKey, new AxContextSchemas(schemasKey),
                         new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey), new AxContextAlbums(),
-                        new AxTasks(tasksKey), new AxPolicies(policiesKey))));
-        assertFalse(model.equals(new AxPolicyModel(modelKey, new AxContextSchemas(schemasKey),
+                        new AxTasks(tasksKey), new AxPolicies(policiesKey)));
+        assertNotEquals(model, new AxPolicyModel(modelKey, new AxContextSchemas(schemasKey),
                         new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey), new AxContextAlbums(albumsKey),
-                        new AxTasks(), new AxPolicies(policiesKey))));
-        assertFalse(model.equals(new AxPolicyModel(modelKey, new AxContextSchemas(schemasKey),
+                        new AxTasks(), new AxPolicies(policiesKey)));
+        assertNotEquals(model, new AxPolicyModel(modelKey, new AxContextSchemas(schemasKey),
                         new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey), new AxContextAlbums(albumsKey),
-                        new AxTasks(tasksKey), new AxPolicies())));
-        assertTrue(model.equals(new AxPolicyModel(modelKey, new AxContextSchemas(schemasKey),
+                        new AxTasks(tasksKey), new AxPolicies()));
+        assertEquals(model, new AxPolicyModel(modelKey, new AxContextSchemas(schemasKey),
                         new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey), new AxContextAlbums(albumsKey),
-                        new AxTasks(tasksKey), new AxPolicies(policiesKey))));
+                        new AxTasks(tasksKey), new AxPolicies(policiesKey)));
 
         assertEquals(0, model.compareTo(model));
         assertEquals(0, model.compareTo(clonedModel));
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java
index 77ce93d..ff3267c 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateOutputTest.java
@@ -23,10 +23,8 @@
 
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -99,16 +97,16 @@
         final AxStateOutput clonedPar = new AxStateOutput(so);
         assertEquals("AxStateOutput:(stateKey=AxReferenceKey:(parentKeyN", clonedPar.toString().substring(0, 50));
 
-        assertFalse(so.hashCode() == 0);
+        assertNotEquals(0, so.hashCode());
 
-        assertTrue(so.equals(so));
-        assertTrue(so.equals(clonedPar));
-        assertFalse(so.equals(null));
-        assertFalse(so.equals((Object) "Hello"));
-        assertFalse(so.equals(new AxStateOutput(AxReferenceKey.getNullKey(), eKey, nsKey)));
-        assertFalse(so.equals(new AxStateOutput(soKey, new AxArtifactKey(), nsKey)));
-        assertFalse(so.equals(new AxStateOutput(soKey, eKey, new AxReferenceKey())));
-        assertTrue(so.equals(new AxStateOutput(soKey, eKey, nsKey)));
+        assertEquals(so, so);
+        assertEquals(so, clonedPar);
+        assertNotNull(so);
+        assertNotEquals(so, (Object) "Hello");
+        assertNotEquals(so, new AxStateOutput(AxReferenceKey.getNullKey(), eKey, nsKey));
+        assertNotEquals(so, new AxStateOutput(soKey, new AxArtifactKey(), nsKey));
+        assertNotEquals(so, new AxStateOutput(soKey, eKey, new AxReferenceKey()));
+        assertEquals(so, new AxStateOutput(soKey, eKey, nsKey));
 
         assertEquals(0, so.compareTo(so));
         assertEquals(0, so.compareTo(clonedPar));
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java
index aa5dd61..31012c6 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTaskReferenceTest.java
@@ -23,10 +23,8 @@
 
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -114,18 +112,17 @@
         AxStateTaskReference clonedStRef = new AxStateTaskReference(stRef);
         assertEquals("AxStateTaskReference:(stateKey=AxReferenceKey:(par", clonedStRef.toString().substring(0, 50));
 
-        assertFalse(stRef.hashCode() == 0);
+        assertNotEquals(0, stRef.hashCode());
 
-        assertTrue(stRef.equals(stRef));
-        assertTrue(stRef.equals(clonedStRef));
-        assertFalse(stRef.equals(null));
-        assertFalse(stRef.equals((Object) "Hello"));
-        assertFalse(stRef.equals(
-                        new AxStateTaskReference(AxReferenceKey.getNullKey(), AxStateTaskOutputType.LOGIC, soKey)));
-        assertFalse(stRef.equals(new AxStateTaskReference(stRefKey, AxStateTaskOutputType.DIRECT, soKey)));
-        assertFalse(stRef
-                        .equals(new AxStateTaskReference(stRefKey, AxStateTaskOutputType.LOGIC, new AxReferenceKey())));
-        assertTrue(stRef.equals(new AxStateTaskReference(stRefKey, AxStateTaskOutputType.LOGIC, soKey)));
+        assertEquals(stRef, stRef);
+        assertEquals(stRef, clonedStRef);
+        assertNotNull(stRef);
+        assertNotEquals(stRef, (Object) "Hello");
+        assertNotEquals(stRef, new AxStateTaskReference(AxReferenceKey.getNullKey(), AxStateTaskOutputType.LOGIC,
+                        soKey));
+        assertNotEquals(stRef, new AxStateTaskReference(stRefKey, AxStateTaskOutputType.DIRECT, soKey));
+        assertNotEquals(stRef, new AxStateTaskReference(stRefKey, AxStateTaskOutputType.LOGIC, new AxReferenceKey()));
+        assertEquals(stRef, new AxStateTaskReference(stRefKey, AxStateTaskOutputType.LOGIC, soKey));
 
         assertNotNull(new AxStateTaskReference(new AxReferenceKey(), new AxArtifactKey(),
                         AxStateTaskOutputType.UNDEFINED, new AxReferenceKey()));
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java
index ef015e7..4c5ad4a 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/StateTest.java
@@ -23,10 +23,8 @@
 
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 
 import java.util.Set;
 import java.util.TreeMap;
@@ -384,40 +382,40 @@
         final AxState clonedState = new AxState(state);
         assertEquals("AxState:(stateKey=AxReferenceKey:(parent", clonedState.toString().substring(0, 40));
 
-        assertFalse(state.hashCode() == 0);
+        assertNotEquals(0, state.hashCode());
 
-        assertTrue(state.equals(state));
-        assertTrue(state.equals(clonedState));
-        assertFalse(state.equals(null));
-        assertFalse(state.equals((Object) "Hello"));
-        assertFalse(state.equals(new AxState(new AxStateParamsBuilder().key(new AxReferenceKey()).trigger(triggerKey)
+        assertEquals(state, state);
+        assertEquals(state, clonedState);
+        assertNotNull(state);
+        assertNotEquals(state, (Object) "Hello");
+        assertNotEquals(state, new AxState(new AxStateParamsBuilder().key(new AxReferenceKey()).trigger(triggerKey)
                         .stateOutputs(soMap).contextAlbumReferenceSet(ctxtSet).taskSelectionLogic(tsl)
-                        .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trMap))));
-        assertFalse(state.equals(new AxState(new AxStateParamsBuilder().key(stateKey).trigger(new AxArtifactKey())
+                        .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trMap)));
+        assertNotEquals(state, new AxState(new AxStateParamsBuilder().key(stateKey).trigger(new AxArtifactKey())
                         .stateOutputs(soMap).contextAlbumReferenceSet(ctxtSet).taskSelectionLogic(tsl)
-                        .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trMap))));
-        assertFalse(state.equals(new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
+                        .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trMap)));
+        assertNotEquals(state, new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
                         .stateOutputs(soEmptyMap).contextAlbumReferenceSet(ctxtSet).taskSelectionLogic(tsl)
-                        .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trMap))));
-        assertFalse(state.equals(new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
+                        .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trMap)));
+        assertNotEquals(state, new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
                         .stateOutputs(soMap).contextAlbumReferenceSet(ctxtEmptySet).taskSelectionLogic(tsl)
-                        .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trMap))));
-        assertFalse(state.equals(new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
+                        .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trMap)));
+        assertNotEquals(state, new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
                         .stateOutputs(soMap).contextAlbumReferenceSet(ctxtSet)
                         .taskSelectionLogic(new AxTaskSelectionLogic()).stateFinalizerLogicMap(sflMap)
-                        .defaultTask(defTaskKey).taskReferenceMap(trMap))));
-        assertFalse(state.equals(new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
+                        .defaultTask(defTaskKey).taskReferenceMap(trMap)));
+        assertNotEquals(state, new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
                         .stateOutputs(soMap).contextAlbumReferenceSet(ctxtSet).taskSelectionLogic(tsl)
-                        .stateFinalizerLogicMap(sflEmptyMap).defaultTask(defTaskKey).taskReferenceMap(trMap))));
-        assertFalse(state.equals(new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
+                        .stateFinalizerLogicMap(sflEmptyMap).defaultTask(defTaskKey).taskReferenceMap(trMap)));
+        assertNotEquals(state, new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
                         .stateOutputs(soMap).contextAlbumReferenceSet(ctxtSet).taskSelectionLogic(tsl)
-                        .stateFinalizerLogicMap(sflMap).defaultTask(new AxArtifactKey()).taskReferenceMap(trMap))));
-        assertFalse(state.equals(new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
+                        .stateFinalizerLogicMap(sflMap).defaultTask(new AxArtifactKey()).taskReferenceMap(trMap)));
+        assertNotEquals(state, new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
                         .stateOutputs(soMap).contextAlbumReferenceSet(ctxtSet).taskSelectionLogic(tsl)
-                        .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trEmptyMap))));
-        assertTrue(state.equals(new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
-                        .stateOutputs(soMap).contextAlbumReferenceSet(ctxtSet).taskSelectionLogic(tsl)
-                        .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trMap))));
+                        .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trEmptyMap)));
+        assertEquals(state, new AxState(new AxStateParamsBuilder().key(stateKey).trigger(triggerKey)
+                     .stateOutputs(soMap).contextAlbumReferenceSet(ctxtSet).taskSelectionLogic(tsl)
+                     .stateFinalizerLogicMap(sflMap).defaultTask(defTaskKey).taskReferenceMap(trMap)));
 
         assertEquals(0, state.compareTo(state));
         assertEquals(0, state.compareTo(clonedState));
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java
index 3dcc5e8..e14dec0 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TaskParameterTest.java
@@ -23,10 +23,8 @@
 
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import org.junit.Test;
@@ -37,7 +35,7 @@
 
 /**
  * Test task parameters.
- * 
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 public class TaskParameterTest {
@@ -90,15 +88,15 @@
         assertEquals("AxTaskParameter:(key=AxReferenceKey:(parentKeyName=ParParentName,parentKeyVersion=0.0.1,"
                         + "parentLocalName=PLN,localName=LN),defaultValue=DefaultValue)", clonedPar.toString());
 
-        assertFalse(par.hashCode() == 0);
+        assertNotEquals(0, par.hashCode());
 
-        assertTrue(par.equals(par));
-        assertTrue(par.equals(clonedPar));
-        assertFalse(par.equals(null));
-        assertFalse(par.equals((Object) "Hello"));
-        assertFalse(par.equals(new AxTaskParameter(AxReferenceKey.getNullKey(), "DefaultValue")));
-        assertFalse(par.equals(new AxTaskParameter(parKey, "OtherDefaultValue")));
-        assertTrue(par.equals(new AxTaskParameter(parKey, "DefaultValue")));
+        assertEquals(par, par);
+        assertEquals(par, clonedPar);
+        assertNotNull(par);
+        assertNotEquals(par, (Object) "Hello");
+        assertNotEquals(par, new AxTaskParameter(AxReferenceKey.getNullKey(), "DefaultValue"));
+        assertNotEquals(par, new AxTaskParameter(parKey, "OtherDefaultValue"));
+        assertEquals(par, new AxTaskParameter(parKey, "DefaultValue"));
 
         assertEquals(0, par.compareTo(par));
         assertEquals(0, par.compareTo(clonedPar));
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java
index 9089e18..17601c8 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java
@@ -1,20 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- *  Modifications Copyright (C) 2019 Nordix Foundation.
+ *  Modifications Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * 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=========================================================
  */
@@ -40,7 +40,7 @@
 
 /**
  * Test policy tasks.
- * 
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 public class TasksTest {
diff --git a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextUpdate.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextUpdate.java
index 71968ff..53c8d1f 100644
--- a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextUpdate.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextUpdate.java
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- *  Modifications Copyright (C) 2019 Nordix Foundation.
+ *  Modifications Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,14 +21,12 @@
 
 package org.onap.policy.apex.testsuites.integration.context.distribution;
 
-import static org.junit.Assert.assertEquals;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
 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.testsuites.integration.context.utils.Constants.APEX_DISTRIBUTOR;
 import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.DATE_CONTEXT_ALBUM;
-import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.EXCEPTION_MESSAGE;
 import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.LONG_CONTEXT_ALBUM;
 import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.MAP_CONTEXT_ALBUM;
 import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.TIME_ZONE;
@@ -41,7 +39,6 @@
 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;
@@ -89,43 +86,18 @@
         longContextAlbum.put(NUMBER_ZERO, 0);
         longContextAlbum.put(NUMBER_ZERO, NUMBER_ZERO);
 
-        try {
-            longContextAlbum.put(NUMBER_ZERO, ZERO);
-            fail(EXCEPTION_MESSAGE);
-        } catch (final ContextRuntimeException e) {
-            assertEquals("Failed to set context value for key \"0\" in album \"LongContextAlbum:0.0.1\":"
+        assertThatThrownBy(() -> longContextAlbum.put(NUMBER_ZERO, ZERO))
+            .hasMessage("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());
-            LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-        }
-
-        try {
-            longContextAlbum.put(NUMBER_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 \"\" of class \"java.lang.String\" not compatible with class \"java.lang.Long\"",
-                e.getMessage());
-            LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-        }
-
-        try {
-            longContextAlbum.put(NUMBER_ZERO, 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());
-            LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-        }
-
-        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());
-            LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-        }
+                + " class \"java.lang.Long\"");
+        assertThatThrownBy(() -> longContextAlbum.put(NUMBER_ZERO, ""))
+            .hasMessage("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\"");
+        assertThatThrownBy(() -> longContextAlbum.put(NUMBER_ZERO, null))
+            .hasMessage("album \"LongContextAlbum:0.0.1\" null values are illegal on key \"0\" for put()");
+        assertThatThrownBy(() -> longContextAlbum.put(null, null))
+            .hasMessage("album \"LongContextAlbum:0.0.1\" null keys are illegal on keys for put()");
 
         assertNull(dateContextAlbum.put("date0", tciA));
         assertTrue(dateContextAlbum.put("date0", tciA).equals(tciA));
diff --git a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/SequentialContextInstantiation.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/SequentialContextInstantiation.java
index 3f690f0..287dd61 100644
--- a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/SequentialContextInstantiation.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/SequentialContextInstantiation.java
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- *  Modifications Copyright (C) 2019 Nordix Foundation.
+ *  Modifications Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,16 +21,15 @@
 
 package org.onap.policy.apex.testsuites.integration.context.distribution;
 
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
 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.testsuites.integration.context.factory.TestContextAlbumFactory.createMultiAlbumsContextModel;
 import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.APEX_DISTRIBUTOR;
 import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.BYTE_VAL;
 import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.DATE_CONTEXT_ALBUM;
-import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.EXCEPTION_MESSAGE;
 import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.FLOAT_VAL;
 import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.INT_VAL;
 import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.LONG_VAL;
@@ -115,15 +114,10 @@
 
             final TestContextDateTzItem tci9 = getTestContextDateTzItem(testDate);
 
-            try {
-                dateAlbum.put("tci9", tci9);
-            } catch (final Exception e) {
-                final String message = "class \"" + TestContextDateTzItem.class.getName()
-                                + "\" not compatible with class \"" + TestContextDateLocaleItem.class.getName()
-                                + "\"";
-                assertTrue(e.getMessage().contains(message));
-                LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-            }
+            assertThatThrownBy(() -> dateAlbum.put("tci9", tci9))
+                .hasMessageContaining("class \"" + TestContextDateTzItem.class.getName()
+                    + "\" not compatible with class \"" + TestContextDateLocaleItem.class.getName()
+                    + "\"");
 
             final TestContextDateLocaleItem tciA01 = new TestContextDateLocaleItem(tciA00);
             final TestContextDateLocaleItem tciA02 = new TestContextDateLocaleItem(tciA00);
@@ -145,14 +139,9 @@
             // 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.getName() + "\""));
-                LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-            }
+            assertThatThrownBy(() -> dateAlbum1.putAll(valueMap1))
+                .hasMessageContaining("not compatible with class \""
+                    + TestContextDateLocaleItem.class.getName() + "\"");
             assertEquals(5, dateAlbum1.size());
 
             valueMap1.clear();
@@ -217,23 +206,14 @@
     }
 
     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());
-            LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-        }
+        assertThatThrownBy(() -> dateAlbum.containsKey(null))
+            .hasMessageContaining("null values are illegal on method parameter \"key\"");
 
         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());
-            LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-        }
+        assertThatThrownBy(() -> dateAlbum.containsValue(null))
+            .hasMessageContaining("null values are illegal on method parameter \"value\"");
 
         assertTrue(dateAlbum.containsValue(tciA01));
         assertTrue(!dateAlbum.containsValue("Hello"));
@@ -241,32 +221,18 @@
 
     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());
-            LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-        }
+        assertThatThrownBy(() -> dateAlbum.get(null))
+            .hasMessageContaining("album \"DateContextAlbum:0.0.1\" null keys are illegal on keys for get()");
 
         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());
-            LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-        }
+        assertThatThrownBy(() -> dateAlbum.put(null, null))
+            .hasMessageContaining("album \"DateContextAlbum:0.0.1\" null keys are illegal on keys for put()");
 
         // Put null ContextItem should work (return null)
-        try {
-            dateAlbum.put(ITEM_NULL, null);
-        } catch (final Exception e) {
-            assertEquals("album \"DateContextAlbum:0.0.1\" null values are illegal on key \"ItemNull\" for put()",
-                            e.getMessage());
-            LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-        }
+        assertThatThrownBy(() -> dateAlbum.put(ITEM_NULL, null))
+            .hasMessageContaining("album \"DateContextAlbum:0.0.1\" null values are illegal on "
+                + "key \"ItemNull\" for put()");
 
         // Should return null
         assertNull(dateAlbum.get(ITEM_NULL));
@@ -279,37 +245,21 @@
         retItem = (TestContextDateLocaleItem) dateAlbum.put(ITEM03, tciA03);
         assertEquals(tciA03Clone, retItem);
 
-        try {
-            dateAlbum.put(ITEM_NULL, null);
-            fail(EXCEPTION_MESSAGE);
-
-        } catch (final Exception e) {
-            assert ("album \"DateContextAlbum:0.0.1\" null values are illegal on key \"ItemNull\" for put()"
-                            .equals(e.getMessage()));
-            LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-        }
+        assertThatThrownBy(() -> dateAlbum.put(ITEM_NULL, null))
+            .hasMessageContaining("album \"DateContextAlbum:0.0.1\" null values are illegal on "
+                + "key \"ItemNull\" for put()");
 
         dateAlbum.put(TEST_AA, tciA00);
         assertEquals(tciA00, dateAlbum.get(TEST_AA));
 
         // Should print warning
-        try {
-            dateAlbum.put(TEST_AA, 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());
-            LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-        }
+        assertThatThrownBy(() -> dateAlbum.put(TEST_AA, null))
+            .hasMessageContaining("album \"DateContextAlbum:0.0.1\" null values are illegal on key \"TestAA\" "
+                + "for put()");
         assertEquals(8, dateAlbum.size());
-        try {
-            dateAlbum.put(TEST_AB, 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());
-            LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
-        }
+        assertThatThrownBy(() -> dateAlbum.put(TEST_AB, null))
+            .hasMessageContaining("album \"DateContextAlbum:0.0.1\" null values are illegal on key \"TestAB\" "
+                + "for put()");
         assertEquals(8, dateAlbum.size());
     }
 
diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/event/TestEventInstantiation.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/event/TestEventInstantiation.java
index 5f89db6..bf883d7 100644
--- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/event/TestEventInstantiation.java
+++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/event/TestEventInstantiation.java
@@ -21,6 +21,7 @@
 
 package org.onap.policy.apex.testsuites.integration.executor.event;
 
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
@@ -168,19 +169,10 @@
         value = event.get("TestMatchCase");
         assertNull(value);
 
-        try {
-            event.put("TestMatchCase", "Hello");
-        } catch (final Exception e) {
-            assertEquals("Event0000:0.0.1:NULL:TestMatchCase: object \"Hello\" of class \"java.lang.String\" "
-                    + "not compatible with class \"java.lang.Byte\"", e.getMessage());
-        }
-
-        try {
-            event.put("TestMatchCase", 123.45);
-        } catch (final Exception e) {
-            assertEquals("Event0000:0.0.1:NULL:TestMatchCase: object \"123.45\" of class \"java.lang.Double\" "
-                    + "not compatible with class \"java.lang.Byte\"", e.getMessage());
-        }
+        assertThatThrownBy(() -> event.put("TestMatchCase", "Hello"))
+            .hasMessage("Event0000:0.0.1:NULL:TestMatchCase: object \"Hello\" of class \"java.lang.String\" "
+                    + "not compatible with class \"java.lang.Byte\"");
+        event.put("TestMatchCase", 123.45);
 
         event.put("TestMatchCase", Byte.valueOf("16"));
 
diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexModelExport.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexModelExport.java
index d73b511..aaf640b 100644
--- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexModelExport.java
+++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexModelExport.java
@@ -1,19 +1,20 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2020 Nordix Foundation
  * ================================================================================
  * 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=========================================================
  */
@@ -99,15 +100,8 @@
         exportPolicyList.clear();
         exportPolicyList.add(new AxArtifactKey("NonExistentPolicy", "0.0.1"));
 
-        try {
-            final AxPolicyModel emptyExportedModel = PolicyModelSplitter.getSubPolicyModel(model, exportPolicyList);
-            assertNotNull(emptyExportedModel);
-        } catch (final Exception e) {
-            assertTrue(e.getMessage()
-                    .equals("new model is invalid:\n" + "***validation of model failed***\n"
-                            + "AxPolicies:Policies:0.0.1 - policyMap may not be null or empty\n"
-                            + "AxEvents:Events:0.0.1 - eventMap may not be null or empty\n"
-                            + "********************************"));
-        }
+        final AxPolicyModel emptyExportedModel = PolicyModelSplitter.getSubPolicyModel(model, exportPolicyList);
+        assertNotNull(emptyExportedModel);
+
     }
 }
diff --git a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/engine/ApexServiceModelUpdateTest.java b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/engine/ApexServiceModelUpdateTest.java
index 7ba309c..fdc60d7 100644
--- a/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/engine/ApexServiceModelUpdateTest.java
+++ b/testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/engine/ApexServiceModelUpdateTest.java
@@ -21,10 +21,10 @@
 
 package org.onap.policy.apex.testsuites.integration.uservice.engine;
 
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -159,14 +159,9 @@
      */
     @Test
     public void testNoModelStart() {
-        try {
-            service.startAll();
-            fail("Engine should not start with no model");
-        } catch (final Exception e) {
-            e.printStackTrace();
-            assertEquals("start()<-Machine-1_process-1_engine-1-0:0.0.0,STOPPED,  cannot start engine, "
-                    + "engine has not been initialized, its model is not loaded", e.getMessage());
-        }
+        assertThatThrownBy(service::startAll)
+            .hasMessage("start()<-Machine-1_process-1_engine-1-0:0.0.0,STOPPED,  cannot start engine, "
+                    + "engine has not been initialized, its model is not loaded");
     }
 
     /**
@@ -227,16 +222,10 @@
         final AxPolicyModel incoPolicyModel0 = new AxPolicyModel(apexSamplePolicyModel);
         incoPolicyModel0.getKey().setName("INCOMPATIBLE");
 
-        try {
-            service.updateModel(parameters.getEngineKey(), incoPolicyModel0, false);
-            fail("model update should fail on incompatible model without force being true");
-        } catch (final Exception e) {
-            System.err.println(e.getMessage());
-            assertEquals("apex model update failed, supplied model with key \"INCOMPATIBLE:0.0.1\" is not a compatible "
-                    + "model update from the existing engine model " + "with key \"SamplePolicyModelJAVASCRIPT:0.0.1\"",
-                    e.getMessage());
-        }
-
+        assertThatThrownBy(() -> service.updateModel(parameters.getEngineKey(), incoPolicyModel0, false))
+            .hasMessage("apex model update failed, supplied model with key \"INCOMPATIBLE:0.0.1\" is "
+                    + "not a compatible model update from the existing engine model " + "with key "
+                    + "\"SamplePolicyModelJAVASCRIPT:0.0.1\"");
         // Still on old model
         sendEvents();
 
@@ -244,17 +233,10 @@
         final AxPolicyModel incoPolicyModel1 = new AxPolicyModel(apexSamplePolicyModel);
         incoPolicyModel1.getKey().setVersion("1.0.1");
 
-        try {
-            service.updateModel(parameters.getEngineKey(), incoPolicyModel1, false);
-            fail("model update should fail on incompatible model without force being true");
-        } catch (final Exception e) {
-            System.err.println(e.getMessage());
-            e.printStackTrace();
-            assertEquals("apex model update failed, supplied model with key \"SamplePolicyModelJAVASCRIPT:1.0.1\" "
-                    + "is not a compatible model update from the existing engine model with key "
-                    + "\"SamplePolicyModelJAVASCRIPT:0.0.1\"", e.getMessage());
-        }
-
+        assertThatThrownBy(() -> service.updateModel(parameters.getEngineKey(), incoPolicyModel1, false))
+            .hasMessage("apex model update failed, supplied model with key \"SamplePolicyModelJAVASCRIPT:"
+                    + "1.0.1\" is not a compatible model update from the existing engine model with key "
+                    + "\"SamplePolicyModelJAVASCRIPT:0.0.1\"");
         // Still on old model
         sendEvents();
 
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java
index 9a099b5..6b15ae4 100644
--- a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. All rights reserved.
+ *  Modifications Copyright (C) 2020 Nordix Foundation
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,11 +21,10 @@
 
 package org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator;
 
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
 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 org.apache.commons.cli.ParseException;
 import org.junit.Test;
@@ -35,287 +35,165 @@
 public class EventGeneratorParametersHandlerTest {
 
     @Test
-    public void testEventGeneratorParameterhandler() {
+    public void testEventGeneratorParameterhandler() throws ParseException {
         EventGeneratorParameterHandler handler = new EventGeneratorParameterHandler();
         assertNotNull(handler);
 
-        try {
-            String[] args =
-                { "-h" };
-            EventGeneratorParameters parameters = handler.parse(args);
-            assertNull(parameters);
-            assertEquals("usage: EventGenerator [options...]",
-                            handler.getHelp(EventGenerator.class.getSimpleName()).substring(0, 34));
-        } catch (ParseException pe) {
-            fail("test should not throw an exception");
-        }
+        String[] args = { "-h" };
+        EventGeneratorParameters parameters = handler.parse(args);
+        assertNull(parameters);
+        assertEquals("usage: EventGenerator [options...]",
+                        handler.getHelp(EventGenerator.class.getSimpleName()).substring(0, 34));
 
-        try {
-            String[] args =
-                {};
-            EventGeneratorParameters parameters = handler.parse(args);
-            assertEquals("localhost", parameters.getHost());
-            assertEquals(32801, parameters.getPort());
-        } catch (ParseException pe) {
-            fail("test should not throw an exception");
-        }
+        args = new String[] {};
+        parameters = handler.parse(args);
+        assertEquals("localhost", parameters.getHost());
+        assertEquals(32801, parameters.getPort());
 
-        try {
-            String[] args =
-                { "-H", "MyHost" };
-            EventGeneratorParameters parameters = handler.parse(args);
-            assertEquals("MyHost", parameters.getHost());
-        } catch (ParseException pe) {
-            fail("test should not throw an exception");
-        }
+        args = new String[] { "-H", "MyHost" };
+        parameters = handler.parse(args);
+        assertEquals("MyHost", parameters.getHost());
 
-        try {
-            String[] args =
-                { "-p", "12345" };
-            EventGeneratorParameters parameters = handler.parse(args);
-            assertEquals(12345, parameters.getPort());
-        } catch (ParseException pe) {
-            fail("test should not throw an exception");
-        }
+        args = new String[] { "-p", "12345" };
+        parameters = handler.parse(args);
+        assertEquals(12345, parameters.getPort());
 
-        try {
-            String[] args =
-                { "-H", "MyHost", "-p", "12345" };
-            EventGeneratorParameters parameters = handler.parse(args);
-            assertEquals("MyHost", parameters.getHost());
-            assertEquals(12345, parameters.getPort());
-        } catch (ParseException pe) {
-            fail("test should not throw an exception");
-        }
 
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/Valid.json" };
-            EventGeneratorParameters parameters = handler.parse(args);
-            assertEquals("ValidPars", parameters.getName());
-            assertEquals("FileHost", parameters.getHost());
-            assertEquals(54321, parameters.getPort());
-        } catch (ParseException pe) {
-            fail("test should not throw an exception");
-        }
+        args = new String[] { "-H", "MyHost", "-p", "12345" };
+        parameters = handler.parse(args);
+        assertEquals("MyHost", parameters.getHost());
+        assertEquals(12345, parameters.getPort());
 
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/Default.json" };
-            EventGeneratorParameters parameters = handler.parse(args);
-            assertEquals("localhost", parameters.getHost());
-            assertEquals(32801, parameters.getPort());
-        } catch (ParseException pe) {
-            fail("test should not throw an exception");
-        }
+        args = new String[] { "-c", "src/test/resources/parameters/unit/Valid.json" };
+        parameters = handler.parse(args);
+        assertEquals("ValidPars", parameters.getName());
+        assertEquals("FileHost", parameters.getHost());
+        assertEquals(54321, parameters.getPort());
 
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/Default.json", "-bc", "100" };
-            EventGeneratorParameters parameters = handler.parse(args);
-            assertEquals(100, parameters.getBatchCount());
-        } catch (ParseException pe) {
-            fail("test should not throw an exception");
-        }
+        args = new String[] { "-c", "src/test/resources/parameters/unit/Default.json" };
+        parameters = handler.parse(args);
+        assertEquals("localhost", parameters.getHost());
+        assertEquals(32801, parameters.getPort());
 
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/Default.json", "-bc", "-1" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("specified parameters are not valid: parameter group \"EventGeneratorParameters\" "
+        args = new String[] { "-c", "src/test/resources/parameters/unit/Default.json", "-bc", "100" };
+        parameters = handler.parse(args);
+        assertEquals(100, parameters.getBatchCount());
+
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-c", "src/test/resources/parameters/unit/Default.json", "-bc", "-1" };
+            handler.parse(arguments);
+        }).hasMessage("specified parameters are not valid: parameter group \"EventGeneratorParameters\" "
                             + "type \"org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator."
                             + "EventGeneratorParameters\" INVALID, parameter group has status INVALID\n"
                             + "  field \"batchCount\" type \"int\" value \"-1\" INVALID, "
                             + "batchCount must be an integer with a value of zero or more, "
-                            + "zero means generate batches forever\n", pe.getMessage());
-        }
+                            + "zero means generate batches forever\n");
+        args = new String[] { "-c", "src/test/resources/parameters/unit/Default.json", "-bs", "12345" };
+        parameters = handler.parse(args);
+        assertEquals(12345, parameters.getBatchSize());
 
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/Default.json", "-bs", "12345" };
-            EventGeneratorParameters parameters = handler.parse(args);
-            assertEquals(12345, parameters.getBatchSize());
-        } catch (ParseException pe) {
-            fail("test should not throw an exception");
-        }
-
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/Default.json", "-bs", "0" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("specified parameters are not valid: parameter group \"EventGeneratorParameters\" "
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-c", "src/test/resources/parameters/unit/Default.json", "-bs", "0" };
+            handler.parse(arguments);
+        }).hasMessage("specified parameters are not valid: parameter group \"EventGeneratorParameters\" "
                             + "type \"org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator."
                             + "EventGeneratorParameters\" INVALID, parameter group has status INVALID\n"
                             + "  field \"batchSize\" type \"int\" value \"0\" INVALID, "
-                            + "batchSize must be an integer greater than zero\n", pe.getMessage());
-        }
+                            + "batchSize must be an integer greater than zero\n");
+        args = new String[] { "-c", "src/test/resources/parameters/unit/Default.json", "-bd", "1000" };
+        parameters = handler.parse(args);
+        assertEquals(1000, parameters.getDelayBetweenBatches());
 
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/Default.json", "-bd", "1000" };
-            EventGeneratorParameters parameters = handler.parse(args);
-            assertEquals(1000, parameters.getDelayBetweenBatches());
-        } catch (ParseException pe) {
-            fail("test should not throw an exception");
-        }
-
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/Default.json", "-bd", "-1" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("specified parameters are not valid: parameter group \"EventGeneratorParameters\" "
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-c", "src/test/resources/parameters/unit/Default.json", "-bd", "-1" };
+            handler.parse(arguments);
+        }).hasMessage("specified parameters are not valid: parameter group \"EventGeneratorParameters\" "
                             + "type \"org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator."
                             + "EventGeneratorParameters\" INVALID, parameter group has status INVALID\n"
                             + "  field \"batchSize\" type \"int\" value \"1\" INVALID, "
-                            + "batchSize must be an integer with a value of zero or more\n", pe.getMessage());
-        }
+                            + "batchSize must be an integer with a value of zero or more\n");
 
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/Default.json", "-o", "Zooby" };
-            EventGeneratorParameters parameters = handler.parse(args);
-            assertEquals("Zooby", parameters.getOutFile());
-        } catch (ParseException pe) {
-            fail("test should not throw an exception");
-        }
+        args = new String[] { "-c", "src/test/resources/parameters/unit/Default.json", "-o", "Zooby" };
+        parameters = handler.parse(args);
+        assertEquals("Zooby", parameters.getOutFile());
 
-        try {
-            String[] args =
-                { "-z" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("Unrecognized option: -z", pe.getMessage());
-        }
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-z" };
+            handler.parse(arguments);
+        }).hasMessage("Unrecognized option: -z");
 
-        try {
-            String[] args =
-                { "-H" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("Missing argument for option: H", pe.getMessage());
-        }
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-H" };
+            handler.parse(arguments);
+        }).hasMessage("Missing argument for option: H");
 
-        try {
-            String[] args =
-                { "-p" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("Missing argument for option: p", pe.getMessage());
-        }
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-p" };
+            handler.parse(arguments);
+        }).hasMessage("Missing argument for option: p");
 
-        try {
-            String[] args =
-                { "-p", "12345", "-z" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("Unrecognized option: -z", pe.getMessage());
-        }
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-p", "12345", "-z" };
+            handler.parse(arguments);
+        }).hasMessage("Unrecognized option: -z");
 
-        try {
-            String[] args =
-                { "-p", "12345", "somethingElse" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("too many command line arguments specified : [somethingElse]", pe.getMessage());
-        }
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-p", "12345", "somethingElse" };
+            handler.parse(arguments);
+        }).hasMessage("too many command line arguments specified : [somethingElse]");
 
-        try {
-            String[] args =
-                { "-c" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("Missing argument for option: c", pe.getMessage());
-        }
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-c" };
+            handler.parse(arguments);
+        }).hasMessage("Missing argument for option: c");
 
-        try {
-            String[] args =
-                { "-H", "MyHost", "-c", "src/test/resources/parameters/unit/Valid.json" };
-            EventGeneratorParameters pars = handler.parse(args);
-            assertEquals("MyHost", pars.getHost());
+        args = new String[] { "-H", "MyHost", "-c", "src/test/resources/parameters/unit/Valid.json" };
+        parameters = handler.parse(args);
+        assertEquals("MyHost", parameters.getHost());
 
-        } catch (ParseException pe) {
-            fail("test should not throw an exception");
-        }
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-c", "src/test/resources/parameters/unit/NonExistant.json" };
+            handler.parse(arguments);
+        }).hasMessageStartingWith("Could not read parameters from configuration file ");
 
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/NonExistant.json" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertTrue(pe.getMessage().startsWith("Could not read parameters from configuration file "));
-        }
-
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/BadHost.json" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("Error parsing JSON parameters from configuration file "
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-c", "src/test/resources/parameters/unit/BadHost.json" };
+            handler.parse(arguments);
+        }).hasMessage("Error parsing JSON parameters from configuration file "
                             + "\"src/test/resources/parameters/unit/BadHost.json\": "
                             + "com.google.gson.stream.MalformedJsonException: "
-                            + "Unexpected value at line 3 column 14 path $.host", pe.getMessage());
-        }
+                            + "Unexpected value at line 3 column 14 path $.host");
 
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/BadPort.json" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("Error parsing JSON parameters from configuration file "
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-c", "src/test/resources/parameters/unit/BadPort.json" };
+            handler.parse(arguments);
+        }).hasMessage("Error parsing JSON parameters from configuration file "
                             + "\"src/test/resources/parameters/unit/BadPort.json\": "
                             + "java.lang.IllegalStateException: Expected an int "
-                            + "but was BOOLEAN at line 4 column 18 path $.port", pe.getMessage());
-        }
+                            + "but was BOOLEAN at line 4 column 18 path $.port");
 
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/Empty.json" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("No parameters found in configuration file "
-                            + "\"src/test/resources/parameters/unit/Empty.json\"", pe.getMessage());
-        }
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-c", "src/test/resources/parameters/unit/Empty.json" };
+            handler.parse(arguments);
+        }).hasMessage("No parameters found in configuration file "
+                + "\"src/test/resources/parameters/unit/Empty.json\"");
 
-        try {
-            String[] args =
-                { "-c", "src/test/resources/parameters/unit/NullHost.json" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("specified parameters are not valid: parameter group \"ValidPars\" "
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-c", "src/test/resources/parameters/unit/NullHost.json" };
+            handler.parse(arguments);
+        }).hasMessage("specified parameters are not valid: parameter group \"ValidPars\" "
                             + "type \"org.onap.policy.apex.testsuites.performance."
                             + "benchmark.eventgenerator.EventGeneratorParameters\" INVALID, "
                             + "parameter group has status INVALID\n" + "  field \"host\" type \"java.lang.String\" "
-                            + "value \"null\" INVALID, host must be a non-blank string\n", pe.getMessage());
-        }
+                            + "value \"null\" INVALID, host must be a non-blank string\n");
 
-        try {
-            String[] args =
-                { "-p", "1023" };
-            handler.parse(args);
-            fail("test should throw an exception");
-        } catch (ParseException pe) {
-            assertEquals("specified parameters are not valid: parameter group \""
+        assertThatThrownBy(() -> {
+            String[] arguments = new String[] { "-p", "1023" };
+            handler.parse(arguments);
+        }).hasMessage("specified parameters are not valid: parameter group \""
                             + "EventGeneratorParameters\" type \"org.onap.policy.apex.testsuites.performance.benchmark."
                             + "eventgenerator.EventGeneratorParameters\" INVALID, parameter group has status INVALID\n"
                             + "  field \"port\" type \"int\" value \"1023\" INVALID, "
-                            + "port must be an integer between 1024 and 65535 inclusive\n" + "", pe.getMessage());
-        }
+                            + "port must be an integer between 1024 and 65535 inclusive\n" + "");
     }
 }
