diff --git a/client/client-monitoring/pom.xml b/client/client-monitoring/pom.xml
index fb150cb..55e1c06 100644
--- a/client/client-monitoring/pom.xml
+++ b/client/client-monitoring/pom.xml
@@ -64,19 +64,8 @@
             <artifactId>commons-cli</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.powermock</groupId>
-            <artifactId>powermock-module-junit4</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.powermock</groupId>
-            <artifactId>powermock-api-mockito</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.powermock</groupId>
-            <artifactId>powermock-module-junit4-rule-agent</artifactId>
-            <version>${version.powermock}</version>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
index 07e2efd..c5c4b12 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
@@ -89,7 +89,7 @@
     public Response createSession(@QueryParam("hostName") final String hostName, @QueryParam("port") final int port) {
         final Gson gson = new Gson();
         final String host = hostName + ":" + port;
-        final EngineServiceFacade engineServiceFacade = new EngineServiceFacade(hostName, port);
+        final EngineServiceFacade engineServiceFacade = getEngineServiceFacade(hostName, port);
 
         try {
             engineServiceFacade.init();
@@ -175,7 +175,7 @@
     @Path("startstop/")
     public Response startStop(@QueryParam("hostName") final String hostName, @QueryParam("port") final int port,
                     @QueryParam("engineId") final String engineId, @QueryParam("startstop") final String startStop) {
-        final EngineServiceFacade engineServiceFacade = new EngineServiceFacade(hostName, port);
+        final EngineServiceFacade engineServiceFacade = getEngineServiceFacade(hostName, port);
 
         try {
             engineServiceFacade.init();
@@ -227,7 +227,7 @@
     public Response periodiceventStartStop(@QueryParam("hostName") final String hostName,
                     @QueryParam("port") final int port, @QueryParam("engineId") final String engineId,
                     @QueryParam("startstop") final String startStop, @QueryParam("period") final long period) {
-        final EngineServiceFacade engineServiceFacade = new EngineServiceFacade(hostName, port);
+        final EngineServiceFacade engineServiceFacade = getEngineServiceFacade(hostName, port);
         final String host = hostName + ":" + port;
         try {
             engineServiceFacade.init();
@@ -312,6 +312,18 @@
         return valueList;
     }
 
+
+    /**
+     * Get an engine service facade for sending REST requests. This method is package because it is used by unit test.
+     * 
+     * @param hostName the host name of the Apex engine
+     * @param port the port of the Apex engine
+     * @return the engine service facade
+     */
+    protected EngineServiceFacade getEngineServiceFacade(final String hostName, final int port) {
+        return new EngineServiceFacade(hostName, port);
+    }
+
     /**
      * A list of values that uses a FIFO sliding window of a fixed size.
      */
diff --git a/client/client-monitoring/src/test/java/org/onap/policy/apex/client/monitoring/rest/RestResourceTest.java b/client/client-monitoring/src/test/java/org/onap/policy/apex/client/monitoring/rest/RestResourceTest.java
index d63f6bd..7345dec 100644
--- a/client/client-monitoring/src/test/java/org/onap/policy/apex/client/monitoring/rest/RestResourceTest.java
+++ b/client/client-monitoring/src/test/java/org/onap/policy/apex/client/monitoring/rest/RestResourceTest.java
@@ -21,67 +21,127 @@
 package org.onap.policy.apex.client.monitoring.rest;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import javax.ws.rs.core.Response;
 
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
+import org.onap.policy.apex.core.deployment.ApexDeploymentException;
 import org.onap.policy.apex.core.deployment.EngineServiceFacade;
 import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
 import org.onap.policy.apex.model.enginemodel.concepts.AxEngineModel;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
 
 /**
  * Test the monitoring rest resource.
  */
-@RunWith(PowerMockRunner.class)
-@PrepareForTest(ApexMonitoringRestResource.class)
 public class RestResourceTest {
     @Mock
-    EngineServiceFacade engineServiceFacadeMock;
+    private EngineServiceFacade engineServiceFacadeMock;
+    private ApexMonitoringRestResource restResource;
 
     /**
-     * Set up the mocking for this test.
+     * Set up mocking of the engine service facade.
      * 
-     * @throws Exception on mock setup failures
+     * @throws ApexException on engine service facade setup errors
      */
     @Before
-    public void setupFacade() throws Exception {
+    public void initializeMocking() throws ApexException {
         MockitoAnnotations.initMocks(this);
-        PowerMockito.whenNew(EngineServiceFacade.class).withAnyArguments().thenReturn(engineServiceFacadeMock);
-    }
 
-    @Test
-    public void testRestResourceCreateSession() throws ApexException {
         final AxArtifactKey engineServiceKey = new AxArtifactKey("EngineServiceKey", "0.0.1");
         final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
         final AxArtifactKey[] engineServiceKeyArray =
             { engineKey };
         final AxEngineModel engineModel = new AxEngineModel(engineServiceKeyArray[0]);
 
-        Mockito.when(engineServiceFacadeMock.getKey()).thenReturn(engineServiceKey);
-        Mockito.when(engineServiceFacadeMock.getEngineKeyArray()).thenReturn(engineServiceKeyArray);
-        Mockito.when(engineServiceFacadeMock.getEngineStatus(engineKey)).thenReturn(engineModel);
+        restResource = Mockito.spy(new ApexMonitoringRestResource());
+        Mockito.doReturn(engineServiceFacadeMock).when(restResource).getEngineServiceFacade("apexServer", 12345);
 
-        ApexMonitoringRestResource restResource = new ApexMonitoringRestResource();
+        Mockito.doReturn(engineServiceKey).when(engineServiceFacadeMock).getKey();
+        Mockito.doReturn(engineServiceKeyArray).when(engineServiceFacadeMock).getEngineKeyArray();
+        Mockito.doReturn(engineModel).when(engineServiceFacadeMock).getEngineStatus(engineKey);
+    }
+
+    @Test
+    public void testRestResourceCreateSession() throws ApexException {
         Response response = restResource.createSession("apexServer", 12345);
         assertEquals(200, response.getStatus());
-        assertTrue(((String) response.getEntity()).contains(engineKey.getId()));
+        assertTrue(((String) response.getEntity()).contains("Engine0:0.0.1"));
+    }
+
+    @Test
+    public void testRestResourceCreateSessionWithApexModelKey() throws ApexException {
+        Mockito.doReturn(new AxArtifactKey("ModelKey:0.0.1")).when(engineServiceFacadeMock).getApexModelKey();
+
+        Response response = restResource.createSession("apexServer", 12345);
+        assertEquals(200, response.getStatus());
+        assertTrue(((String) response.getEntity()).contains("Engine0:0.0.1"));
+    }
+
+    @Test
+    public void testRestResourceCreateSessionConnectException() throws ApexException {
+        Mockito.doThrow(new ApexDeploymentException("Connection Failed")).when(engineServiceFacadeMock).init();
+
+        Response response = restResource.createSession("apexServer", 12345);
+        assertEquals(500, response.getStatus());
+        assertTrue(((String) response.getEntity()).contains("Error connecting to Apex Engine Service"));
+    }
+
+    @Test
+    public void testRestResourceCreateSessionGetException() throws ApexException {
+        final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
+        Mockito.doThrow(new ApexException("Exception on get")).when(engineServiceFacadeMock).getEngineStatus(engineKey);
+
+        Response response = restResource.createSession("apexServer", 12345);
+        assertEquals(200, response.getStatus());
+    }
+
+    @Test
+    public void testRestResourceCreateSessionInfo() throws ApexException {
+        final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
+        Mockito.doReturn("{}").when(engineServiceFacadeMock).getEngineInfo(engineKey);
+
+        Response response = restResource.createSession("apexServer", 12345);
+        assertEquals(200, response.getStatus());
+    }
+
+    @Test
+    public void testRestResourceCreateSessionNullInfo() throws ApexException {
+        final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
+        Mockito.doReturn(null).when(engineServiceFacadeMock).getEngineInfo(engineKey);
+
+        Response response = restResource.createSession("apexServer", 12345);
+        assertEquals(200, response.getStatus());
+    }
+
+    @Test
+    public void testRestResourceCreateSessionEmptyInfo() throws ApexException {
+        final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
+        Mockito.doReturn(" ").when(engineServiceFacadeMock).getEngineInfo(engineKey);
+
+        Response response = restResource.createSession("apexServer", 12345);
+        assertEquals(200, response.getStatus());
+    }
+
+    @Test
+    public void testRestResourceCreateSessionExceptionInfo() throws ApexException {
+        final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
+        Mockito.doThrow(new ApexException("Exception on info")).when(engineServiceFacadeMock).getEngineInfo(engineKey);
+
+        Response response = restResource.createSession("apexServer", 12345);
+        assertEquals(200, response.getStatus());
     }
 
     @Test
     public void testRestResourceStartEngine() throws ApexException {
         final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
 
-        ApexMonitoringRestResource restResource = new ApexMonitoringRestResource();
         Response response = restResource.startStop("apexServer", 12345, engineKey.getId(), "Start");
         assertEquals(200, response.getStatus());
     }
@@ -90,36 +150,113 @@
     public void testRestResourceStopEngine() throws ApexException {
         final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
 
-        ApexMonitoringRestResource restResource = new ApexMonitoringRestResource();
         Response response = restResource.startStop("apexServer", 12345, engineKey.getId(), "Stop");
         assertEquals(200, response.getStatus());
     }
 
     @Test
+    public void testRestResourceNotStartStopEngine() throws ApexException {
+        final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
+
+        Response response = restResource.startStop("apexServer", 12345, engineKey.getId(), "Hello");
+        assertEquals(200, response.getStatus());
+    }
+
+    @Test
+    public void testRestResourceInitExceptionStartStopEngine() throws ApexException {
+        Mockito.doThrow(new ApexDeploymentException("Exception on init")).when(engineServiceFacadeMock).init();
+
+        final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
+
+        Response response = restResource.startStop("apexServer", 12345, engineKey.getId(), "Hello");
+        assertEquals(500, response.getStatus());
+    }
+
+    @Test
+    public void testRestResourceExceptionStartStopEngine() throws ApexException {
+        final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
+        Mockito.doThrow(new ApexDeploymentException("Exception on Start/Stop")).when(engineServiceFacadeMock)
+                        .startEngine(engineKey);
+
+        Response response = restResource.startStop("apexServer", 12345, engineKey.getId(), "Start");
+        assertEquals(500, response.getStatus());
+    }
+
+    @Test
     public void testRestResourceStartPeriodicEvents() throws ApexException {
         final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
 
-        ApexMonitoringRestResource restResource = new ApexMonitoringRestResource();
         Response response = restResource.periodiceventStartStop("apexServer", 12345, engineKey.getId(), "Start", 1000);
         assertEquals(200, response.getStatus());
     }
 
     @Test
-    public void testRestResourceStopEPeriodicEvents() throws ApexException {
+    public void testRestResourceStopPeriodicEvents() throws ApexException {
         final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
 
-        ApexMonitoringRestResource restResource = new ApexMonitoringRestResource();
         Response response = restResource.periodiceventStartStop("apexServer", 12345, engineKey.getId(), "Stop", 1000);
         assertEquals(200, response.getStatus());
     }
 
     @Test
-    public void testCounter() {
-        ApexMonitoringRestResource restResource = new ApexMonitoringRestResource();
+    public void testRestResourceNotStartStopPeriodicEvents() throws ApexException {
+        final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
 
+        Response response = restResource.periodiceventStartStop("apexServer", 12345, engineKey.getId(), "Hello", 1000);
+        assertEquals(200, response.getStatus());
+    }
+
+    @Test
+    public void testRestResourceExceptionPeriodicEvents() throws ApexException {
+        final AxArtifactKey engineKey = new AxArtifactKey("Engine0", "0.0.1");
+        Mockito.doThrow(new ApexDeploymentException("Exception on Periodic Events")).when(engineServiceFacadeMock)
+                        .stopPerioidicEvents(engineKey);
+
+        Response response = restResource.periodiceventStartStop("apexServer", 12345, engineKey.getId(), "Stop", 1000);
+        assertEquals(500, response.getStatus());
+    }
+
+    @Test
+    public void testCounter() {
         ApexMonitoringRestResource.Counter counter = restResource.new Counter(1538338576, 1538338592);
 
         assertEquals(1538338576, counter.getTimestamp());
         assertEquals(1538338592, counter.getValue());
     }
+
+    @Test
+    public void testSlidingWindow() {
+        ApexMonitoringRestResource.SlidingWindowList<String> slidingWindowList0 = restResource.new SlidingWindowList<>(
+                        2);
+
+        assertFalse(slidingWindowList0.hashCode() == 0);
+        
+        assertTrue(slidingWindowList0.add("Hello"));
+        assertTrue(slidingWindowList0.add("Hi"));
+        assertTrue(slidingWindowList0.add("Howdy"));
+        
+        assertFalse(slidingWindowList0.equals(null));
+        assertTrue(slidingWindowList0.equals(slidingWindowList0));
+
+        ApexMonitoringRestResource.SlidingWindowList<String> slidingWindowList1 = restResource.new SlidingWindowList<>(
+                        2);
+        ApexMonitoringRestResource.SlidingWindowList<String> slidingWindowList2 = restResource.new SlidingWindowList<>(
+                        2);
+        assertFalse(slidingWindowList0.equals(slidingWindowList1));
+        assertFalse(slidingWindowList0.equals(slidingWindowList2));
+        assertTrue(slidingWindowList1.equals(slidingWindowList2));
+        ApexMonitoringRestResource.SlidingWindowList<String> slidingWindowList3 = restResource.new SlidingWindowList<>(
+                        3);
+        assertFalse(slidingWindowList1.equals(slidingWindowList3));
+        ApexMonitoringRestResource.SlidingWindowList<Integer> slidingWindowList4 = restResource.new SlidingWindowList<>(
+                        3);
+        assertTrue(slidingWindowList3.add("Hello"));
+        assertTrue(slidingWindowList4.add(10));
+        assertFalse(slidingWindowList3.equals(slidingWindowList4));
+    }
+
+    @Test
+    public void mopUp() {
+        assertEquals(engineServiceFacadeMock, restResource.getEngineServiceFacade("apexServer", 12345));
+    }
 }
diff --git a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextTreeSetItem.java b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextTreeSetItem.java
index e38d9c6..22056db 100644
--- a/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextTreeSetItem.java
+++ b/context/context-test-utils/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextTreeSetItem.java
@@ -21,6 +21,7 @@
 package org.onap.policy.apex.context.test.concepts;
 
 import java.io.Serializable;
+import java.util.Arrays;
 import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
@@ -45,7 +46,9 @@
      *
      * @param setArray the set array
      */
-    public TestContextTreeSetItem(final String[] setArray) {}
+    public TestContextTreeSetItem(final String[] setArray) {
+        this.setValue = new TreeSet<>(Arrays.asList(setArray));
+    }
 
     /**
      * The Constructor.
