diff --git a/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java b/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java
index 9321423..44ee522 100644
--- a/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java
+++ b/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java
@@ -52,6 +52,8 @@
             "The policies defined have been created but NOT deployed on the policy engine", 50);
     public static final ExternalComponentState SENT_AND_DEPLOYED = new ExternalComponentState("SENT_AND_DEPLOYED",
             "The policies defined have been created and deployed on the policy engine", 10);
+    public static final ExternalComponentState UNKNOWN = new ExternalComponentState("UNKNOWN",
+            "The current status is not clear. Need to regresh the status to get the current status.", 0);
 
     /**
      * Default constructor.
@@ -62,7 +64,7 @@
          * on by one, each time we increase the level we can't decrease it anymore.
          * That's why it starts with the lowest one SENT_AND_DEPLOYED.
          */
-        super(SENT_AND_DEPLOYED);
+        super(UNKNOWN);
     }
 
     @Override
diff --git a/src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java b/src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java
index 8745cc5..072d577 100644
--- a/src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/CldsServiceItCase.java
@@ -23,10 +23,13 @@
 
 package org.onap.clamp.clds.it;
 
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -35,6 +38,7 @@
 import java.util.Properties;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.NotAuthorizedException;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -44,7 +48,6 @@
 import org.onap.clamp.clds.model.CldsInfo;
 import org.onap.clamp.clds.service.CldsService;
 import org.onap.clamp.clds.util.LoggingUtils;
-import org.onap.clamp.clds.util.ResourceFileUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
@@ -66,15 +69,12 @@
 
     @Autowired
     private CldsService cldsService;
-    private String bpmnText;
-    private String imageText;
-    private String bpmnPropText;
-    private String docText;
 
-    private Authentication authentication;
-    private List<GrantedAuthority> authList = new LinkedList<GrantedAuthority>();
     private LoggingUtils util;
-
+    private SecurityContext securityContext = mock(SecurityContext.class);
+    private Authentication auth = Mockito.mock(Authentication.class);
+    private UserDetails userDetails = Mockito.mock(UserDetails.class);
+    private List<GrantedAuthority> authorityList = new LinkedList<GrantedAuthority>();
     /**
      * Setup the variable before the tests execution.
      *
@@ -82,20 +82,6 @@
      */
     @Before
     public void setupBefore() throws IOException {
-        bpmnText = ResourceFileUtil.getResourceAsString("example/model-properties/tca_new/tca-template.xml");
-        imageText = ResourceFileUtil.getResourceAsString("example/model-properties/tca_new/tca-img.xml");
-        bpmnPropText = ResourceFileUtil.getResourceAsString("example/model-properties/tca_new/model-properties.json");
-        docText = ResourceFileUtil.getResourceAsString("example/model-properties/tca_new/doc-text.yaml");
-
-        authList.add(new SimpleGrantedAuthority("permission-type-cl-manage|dev|*"));
-        authList.add(new SimpleGrantedAuthority("permission-type-cl|dev|read"));
-        authList.add(new SimpleGrantedAuthority("permission-type-cl|dev|update"));
-        authList.add(new SimpleGrantedAuthority("permission-type-template|dev|read"));
-        authList.add(new SimpleGrantedAuthority("permission-type-template|dev|update"));
-        authList.add(new SimpleGrantedAuthority("permission-type-filter-vf|dev|*"));
-        authList.add(new SimpleGrantedAuthority("permission-type-cl-event|dev|*"));
-        authentication = new UsernamePasswordAuthenticationToken(new User("admin", "", authList), "", authList);
-
         util = Mockito.mock(LoggingUtils.class);
         Mockito.doNothing().when(util).entering(Matchers.any(HttpServletRequest.class), Matchers.any(String.class));
         cldsService.setLoggingUtil(util);
@@ -104,12 +90,9 @@
 
     @Test
     public void testCldsInfoNotAuthorized() {
-        SecurityContext securityContext = Mockito.mock(SecurityContext.class);
-        Authentication localAuth = Mockito.mock(Authentication.class);
-        UserDetails userDetails = Mockito.mock(UserDetails.class);
         Mockito.when(userDetails.getUsername()).thenReturn("admin");
-        Mockito.when(securityContext.getAuthentication()).thenReturn(localAuth);
-        Mockito.when(localAuth.getPrincipal()).thenReturn(userDetails);
+        Mockito.when(securityContext.getAuthentication()).thenReturn(auth);
+        Mockito.when(auth.getPrincipal()).thenReturn(userDetails);
 
         cldsService.setSecurityContext(securityContext);
         CldsInfo cldsInfo = cldsService.getCldsInfo();
@@ -121,7 +104,17 @@
 
     @Test
     public void testCldsInfoAuthorized() throws Exception {
-        SecurityContext securityContext = Mockito.mock(SecurityContext.class);
+        Authentication authentication;
+        List<GrantedAuthority> authList = new LinkedList<GrantedAuthority>();
+        authList.add(new SimpleGrantedAuthority("permission-type-cl-manage|dev|*"));
+        authList.add(new SimpleGrantedAuthority("permission-type-cl|dev|read"));
+        authList.add(new SimpleGrantedAuthority("permission-type-cl|dev|update"));
+        authList.add(new SimpleGrantedAuthority("permission-type-template|dev|read"));
+        authList.add(new SimpleGrantedAuthority("permission-type-template|dev|update"));
+        authList.add(new SimpleGrantedAuthority("permission-type-filter-vf|dev|*"));
+        authList.add(new SimpleGrantedAuthority("permission-type-cl-event|dev|*"));
+        authentication = new UsernamePasswordAuthenticationToken(new User("admin", "", authList), "", authList);
+
         Mockito.when(securityContext.getAuthentication()).thenReturn(authentication);
 
         cldsService.setSecurityContext(securityContext);
@@ -138,4 +131,110 @@
         assertEquals(cldsInfo.getCldsVersion(), prop.getProperty("clds.version"));
         assertEquals(cldsInfo.getUserName(), "admin");
     }
+
+    @Test(expected = NotAuthorizedException.class)
+    public void isAuthorizedForVfTestNotAuthorized1() throws Exception {
+        when(userDetails.getUsername()).thenReturn("testName");
+        when(auth.getPrincipal()).thenReturn(userDetails);
+        when(securityContext.getAuthentication()).thenReturn(auth);
+        cldsService.setSecurityContext(securityContext);
+        boolean res = cldsService.isAuthorizedForVf("testId");
+        assertThat(res).isTrue();
+    }
+
+    @Test(expected = NotAuthorizedException.class)
+    public void isAuthorizedForVfTestNotAuthorized2() throws Exception {
+        when(userDetails.getUsername()).thenReturn("testName");
+        when(auth.getPrincipal()).thenReturn(userDetails);
+        authorityList.add(new SimpleGrantedAuthority("permission-type-filter-vf|prod|*"));
+        when((List<GrantedAuthority>)auth.getAuthorities()).thenReturn(authorityList);
+        when(securityContext.getAuthentication()).thenReturn(auth);
+        cldsService.setSecurityContext(securityContext);
+        boolean res = cldsService.isAuthorizedForVf("testId");
+        assertThat(res).isTrue();
+    }
+
+    @Test(expected = NotAuthorizedException.class)
+    public void isAuthorizedForVfTestNotAuthorized3() throws Exception {
+        when(userDetails.getUsername()).thenReturn("testName");
+        when(auth.getPrincipal()).thenReturn(userDetails);
+        authorityList.add(new SimpleGrantedAuthority("permission-type-filter-vf|dev|testId2"));
+        when((List<GrantedAuthority>)auth.getAuthorities()).thenReturn(authorityList);
+        when(securityContext.getAuthentication()).thenReturn(auth);
+        cldsService.setSecurityContext(securityContext);
+        boolean res = cldsService.isAuthorizedForVf("testId");
+        assertThat(res).isTrue();
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void isAuthorizedForVfTestNotAuthorized4() throws Exception {
+        when(userDetails.getUsername()).thenReturn("testName");
+        when(auth.getPrincipal()).thenReturn(userDetails);
+        when(securityContext.getAuthentication()).thenReturn(null);
+        cldsService.setSecurityContext(securityContext);
+        boolean res = cldsService.isAuthorizedForVf("testId");
+        assertThat(res).isTrue();
+    }
+
+    @Test
+    public void isAuthorizedForVfTest1() throws Exception {
+        when(userDetails.getUsername()).thenReturn("testName");
+        when(auth.getPrincipal()).thenReturn(userDetails);
+        authorityList.add(new SimpleGrantedAuthority("permission-type-filter-vf|*|*"));
+        when((List<GrantedAuthority>)auth.getAuthorities()).thenReturn(authorityList);
+        when(securityContext.getAuthentication()).thenReturn(auth);
+
+        cldsService.setSecurityContext(securityContext);
+        boolean res = cldsService.isAuthorizedForVf("testId");
+        assertThat(res).isTrue();
+    }
+
+    @Test
+    public void isAuthorizedForVfTest2() throws Exception {
+        when(userDetails.getUsername()).thenReturn("testName");
+        when(auth.getPrincipal()).thenReturn(userDetails);
+        authorityList.add(new SimpleGrantedAuthority("permission-type-filter-vf|dev|*"));
+        when((List<GrantedAuthority>)auth.getAuthorities()).thenReturn(authorityList);
+        when(securityContext.getAuthentication()).thenReturn(auth);
+
+        cldsService.setSecurityContext(securityContext);
+        boolean res = cldsService.isAuthorizedForVf("testId");
+        assertThat(res).isTrue();
+    }
+
+    @Test
+    public void isAuthorizedForVfTest3() throws Exception {
+        when(userDetails.getUsername()).thenReturn("testName");
+        when(auth.getPrincipal()).thenReturn(userDetails);
+        authorityList.add(new SimpleGrantedAuthority("permission-type-filter-vf|dev|testId"));
+        when((List<GrantedAuthority>)auth.getAuthorities()).thenReturn(authorityList);
+        when(securityContext.getAuthentication()).thenReturn(auth);
+
+        cldsService.setSecurityContext(securityContext);
+        boolean res = cldsService.isAuthorizedForVf("testId");
+        assertThat(res).isTrue();
+    }
+
+    @Test
+    public void isAuthorizedForVfTest4() throws Exception {
+        when(userDetails.getUsername()).thenReturn("testName");
+        when(auth.getPrincipal()).thenReturn(userDetails);
+        authorityList.add(new SimpleGrantedAuthority("permission-type-filter-vf|*|testId"));
+        when((List<GrantedAuthority>)auth.getAuthorities()).thenReturn(authorityList);
+        when(securityContext.getAuthentication()).thenReturn(auth);
+
+        cldsService.setSecurityContext(securityContext);
+        boolean res = cldsService.isAuthorizedForVf("testId");
+        assertThat(res).isTrue();
+    }
+
+    @Test
+    public void getUserIdTest() throws Exception {
+        when(userDetails.getUsername()).thenReturn("testName");
+        when(auth.getPrincipal()).thenReturn(userDetails);
+        when(securityContext.getAuthentication()).thenReturn(auth);
+
+        cldsService.setSecurityContext(securityContext);
+        assertThat(cldsService.getUserId()).isEqualTo("testName");
+    }
 }
diff --git a/src/test/java/org/onap/clamp/clds/model/jsontype/JsonTypeDescriptorTest.java b/src/test/java/org/onap/clamp/clds/model/jsontype/JsonTypeDescriptorTest.java
new file mode 100644
index 0000000..560f54c
--- /dev/null
+++ b/src/test/java/org/onap/clamp/clds/model/jsontype/JsonTypeDescriptorTest.java
@@ -0,0 +1,96 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 Samsung. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ *
+ */
+
+package org.onap.clamp.clds.model.jsontype;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import com.google.gson.JsonObject;
+
+import org.hibernate.HibernateException;
+import org.junit.Test;
+import org.onap.clamp.dao.model.jsontype.JsonTypeDescriptor;
+
+public class JsonTypeDescriptorTest {
+
+    private JsonTypeDescriptor descriptor = new JsonTypeDescriptor();
+
+    @Test
+    public void testFromString() {
+        JsonObject object = new JsonObject();
+        object.addProperty("one","oneValue");
+        JsonObject child = new JsonObject();
+        child.addProperty("two","twoValue");
+        object.add("child",child);
+
+        JsonObject jsonResult = descriptor.fromString("{\"one\":\"oneValue\",\"child\":{\"two\":\"twoValue\"}}");
+
+        assertThat(jsonResult).isEqualTo(object);
+    }
+
+    @Test
+    public void testUnwrap() {
+        JsonObject res1 = descriptor.unwrap(null, null, null);
+        assertThat(res1).isNull();
+
+        JsonObject object = new JsonObject();
+        object.addProperty("one","oneValue");
+        JsonObject child = new JsonObject();
+        child.addProperty("two","twoValue");
+        object.add("child",child);
+        String res2 = descriptor.unwrap(object, String.class, null);
+        assertThat(res2.replace("\n", "").replace(" ", ""))
+                .isEqualTo("{\"one\":\"oneValue\",\"child\":{\"two\":\"twoValue\"}}");
+
+        Object res3 = descriptor.unwrap(object, JsonObject.class, null);
+        String res3Str = ((String) res3).replace(" ", "").replace("\\n", "").replace("\\", "")
+                .replace("\"{", "{").replace("}\"", "}");
+        assertThat(res3Str).isEqualTo("{\"one\":\"oneValue\",\"child\":{\"two\":\"twoValue\"}}");
+    }
+
+    @Test(expected = HibernateException.class)
+    public void testUnwrapExpectationThrown() {
+        JsonObject object = new JsonObject();
+        object.addProperty("one","oneValue");
+
+        descriptor.unwrap(object, Integer.class, null);
+    }
+
+    @Test
+    public void testWrap() {
+        JsonObject res1 = descriptor.wrap(null, null);
+        assertThat(res1).isNull();
+
+        JsonObject object = new JsonObject();
+        object.addProperty("one","oneValue");
+        JsonObject child = new JsonObject();
+        child.addProperty("two","twoValue");
+        object.add("child",child);
+        JsonObject res2 = descriptor.wrap("{\"one\":\"oneValue\",\"child\":{\"two\":\"twoValue\"}}", null);
+        assertThat(res2).isEqualTo(object);
+    }
+
+    @Test(expected = HibernateException.class)
+    public void testWrapExpectationThrown() {
+        descriptor.wrap(1, null);
+    }
+}
\ No newline at end of file
diff --git a/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java b/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java
index 0a3c1e1..557fdce 100644
--- a/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java
+++ b/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java
@@ -31,9 +31,13 @@
 import java.io.IOException;
 import java.util.HashSet;
 
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
 import org.junit.Test;
+import org.mockito.Mockito;
 import org.onap.clamp.clds.model.dcae.DcaeOperationStatusResponse;
 import org.onap.clamp.loop.components.external.DcaeComponent;
+import org.onap.clamp.loop.components.external.ExternalComponentState;
 import org.onap.clamp.policy.microservice.MicroServicePolicy;
 
 public class DcaeComponentTest {
@@ -90,4 +94,61 @@
         assertThat(unDeploymentPayload).isEqualTo(expectedPayload);
     }
 
+    @Test
+    public void computeStateTest() throws IOException {
+        Exchange exchange = Mockito.mock(Exchange.class);
+        Message message = Mockito.mock(Message.class);
+        Exchange exchange2 = Mockito.mock(Exchange.class);
+        Mockito.when(exchange.getIn()).thenReturn(message);
+        Mockito.when(message.getExchange()).thenReturn(exchange2);
+        Mockito.when(exchange2.getProperty("dcaeResponse")).thenReturn(null);
+
+        DcaeComponent dcae = new DcaeComponent();
+
+        // initial state
+        ExternalComponentState state = dcae.computeState(exchange);
+        assertThat(state.getStateName()).isEqualTo("BLUEPRINT_DEPLOYED");
+
+        // OperationalType = install
+        DcaeOperationStatusResponse dcaeResponse = Mockito.mock(DcaeOperationStatusResponse.class); 
+        Mockito.when(dcaeResponse.getOperationType()).thenReturn("install");
+
+        Mockito.when(dcaeResponse.getStatus()).thenReturn("succeeded");
+        Mockito.when(exchange2.getProperty("dcaeResponse")).thenReturn(dcaeResponse);
+        ExternalComponentState state2 = dcae.computeState(exchange);
+        assertThat(state2.getStateName()).isEqualTo("MICROSERVICE_INSTALLED_SUCCESSFULLY");
+        Mockito.when(dcaeResponse.getStatus()).thenReturn("processing");
+        ExternalComponentState state3 = dcae.computeState(exchange);
+        assertThat(state3.getStateName()).isEqualTo("PROCESSING_MICROSERVICE_INSTALLATION");
+
+        Mockito.when(dcaeResponse.getStatus()).thenReturn("failed");
+        ExternalComponentState state4 = dcae.computeState(exchange);
+        assertThat(state4.getStateName()).isEqualTo("MICROSERVICE_INSTALLATION_FAILED");
+
+        // OperationalType = uninstall
+        Mockito.when(dcaeResponse.getOperationType()).thenReturn("uninstall");
+
+        Mockito.when(dcaeResponse.getStatus()).thenReturn("succeeded");
+        Mockito.when(exchange2.getProperty("dcaeResponse")).thenReturn(dcaeResponse);
+        ExternalComponentState state5 = dcae.computeState(exchange);
+        assertThat(state5.getStateName()).isEqualTo("MICROSERVICE_UNINSTALLED_SUCCESSFULLY");
+
+        Mockito.when(dcaeResponse.getStatus()).thenReturn("processing");
+        ExternalComponentState state6 = dcae.computeState(exchange);
+        assertThat(state6.getStateName()).isEqualTo("PROCESSING_MICROSERVICE_UNINSTALLATION");
+
+        Mockito.when(dcaeResponse.getStatus()).thenReturn("failed");
+        ExternalComponentState state7 = dcae.computeState(exchange);
+        assertThat(state7.getStateName()).isEqualTo("MICROSERVICE_UNINSTALLATION_FAILED");
+
+        // error cases
+        Mockito.when(dcaeResponse.getOperationType()).thenReturn("whatever");
+        ExternalComponentState state8 = dcae.computeState(exchange);
+        assertThat(state8.getStateName()).isEqualTo("IN_ERROR");
+
+        Mockito.when(dcaeResponse.getOperationType()).thenReturn("install");
+        Mockito.when(dcaeResponse.getStatus()).thenReturn("anythingelse");
+        ExternalComponentState state9 = dcae.computeState(exchange);
+        assertThat(state9.getStateName()).isEqualTo("IN_ERROR");
+    }
 }
diff --git a/src/test/java/org/onap/clamp/loop/ExternalComponentStateTest.java b/src/test/java/org/onap/clamp/loop/ExternalComponentStateTest.java
new file mode 100644
index 0000000..34fcc07
--- /dev/null
+++ b/src/test/java/org/onap/clamp/loop/ExternalComponentStateTest.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights
+ *                             reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ *
+ */
+
+package org.onap.clamp.loop;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import org.junit.Test;
+import org.onap.clamp.loop.components.external.ExternalComponentState;
+
+public class ExternalComponentStateTest {
+    private ExternalComponentState state =  new ExternalComponentState("NOT_SENT",
+            "The policies defined have NOT yet been created on the policy engine", 90);
+
+    @Test
+    public void generalTest() {
+        assertThat(state.toString()).isEqualTo("NOT_SENT");
+        state.setLevel(70);
+        assertThat(state.getLevel()).isEqualTo(70);
+    }
+
+    @Test
+    public void equalsTest() {
+        assertThat(state.equals(null)).isEqualTo(false);
+
+        ExternalComponentState state2 =  new ExternalComponentState("NOT_SENT",
+               "The policies defined have NOT yet been created on the policy engine", 90);
+        assertThat(state.equals(state2)).isEqualTo(true);
+
+        assertThat(state.equals(12)).isEqualTo(false);
+
+        state2.setLevel(70);
+        assertThat(state.equals(state2)).isEqualTo(true);
+
+        ExternalComponentState state3 =  new ExternalComponentState("SENT",
+                "The policies defined have NOT yet been created on the policy engine", 90);
+        assertThat(state.equals(state3)).isEqualTo(false);
+
+        ExternalComponentState state4 =  new ExternalComponentState(null,
+                "The policies defined have NOT yet been created on the policy engine", 90);
+        ExternalComponentState state5 =  new ExternalComponentState(null,
+                "The policies defined have NOT yet been", 50);
+        assertThat(state4.equals(state3)).isEqualTo(false);
+        assertThat(state4.equals(state5)).isEqualTo(true);
+    }
+
+    @Test
+    public void compareToTest() {
+        ExternalComponentState state2 =  new ExternalComponentState("NOT_SENT",
+               "The policies defined have NOT yet been created on the policy engine", 90);
+        assertThat(state.compareTo(state2)).isEqualTo(0);
+
+        ExternalComponentState state3 =  new ExternalComponentState("SENT",
+                "The policies defined have NOT yet been created on the policy engine", 50);
+        assertThat(state.compareTo(state3)).isEqualTo(1);
+
+        ExternalComponentState state4 =  new ExternalComponentState(null,
+                "The policies defined have NOT yet been created on the policy engine", 100);
+        assertThat(state.compareTo(state4)).isEqualTo(-1);
+
+    }
+}
\ No newline at end of file
diff --git a/src/test/java/org/onap/clamp/loop/PolicyComponentTest.java b/src/test/java/org/onap/clamp/loop/PolicyComponentTest.java
new file mode 100644
index 0000000..e822dfb
--- /dev/null
+++ b/src/test/java/org/onap/clamp/loop/PolicyComponentTest.java
@@ -0,0 +1,246 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights
+ *                             reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ *
+ */
+
+package org.onap.clamp.loop;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.IOException;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.clamp.loop.components.external.ExternalComponentState;
+import org.onap.clamp.loop.components.external.PolicyComponent;
+
+public class PolicyComponentTest {
+
+    /**
+    * Test the computeState method. 
+    * oldState           newState        expectedFinalState
+    * NOT_SENT      SENT_AND_DEPLOYED          NOT_SENT
+    * NOT_SENT             SENT                NOT_SENT
+    * NOT_SENT           NOT_SENT              NOT_SENT
+    * NOT_SENT           IN_ERROR              IN_ERROR
+    */
+    @Test
+    public void computeStateTestOriginalStateUnknown() {
+        Exchange exchange = Mockito.mock(Exchange.class);
+        Message message = Mockito.mock(Message.class);
+        Exchange exchange2 = Mockito.mock(Exchange.class);
+        Mockito.when(exchange.getIn()).thenReturn(message);
+        Mockito.when(message.getExchange()).thenReturn(exchange2);
+        // policy found + deployed
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(true);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(true);
+        PolicyComponent policy = new PolicyComponent();
+
+        ExternalComponentState state = policy.computeState(exchange);
+        assertThat(state.getStateName()).isEqualTo("SENT_AND_DEPLOYED");
+        // policy found + not deployed
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(true);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(false);
+        ExternalComponentState state2 = policy.computeState(exchange);
+        assertThat(state2.getStateName()).isEqualTo("SENT");
+        // policy not found + not deployed
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(false);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(false);
+        ExternalComponentState state4 = policy.computeState(exchange);
+        assertThat(state4.getStateName()).isEqualTo("NOT_SENT");
+        // policy not found + deployed
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(false);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(true);
+        ExternalComponentState state3 = policy.computeState(exchange);
+        assertThat(state3.getStateName()).isEqualTo("IN_ERROR");
+    }
+    /**
+    * Test the computeState method. 
+    * oldState           newState        expectedFinalState
+    * NOT_SENT      SENT_AND_DEPLOYED          NOT_SENT
+    * NOT_SENT             SENT                NOT_SENT
+    * NOT_SENT           NOT_SENT              NOT_SENT
+    * NOT_SENT           IN_ERROR              IN_ERROR
+    */
+    @Test
+    public void computeStateTestOriginalStateNotSent() {
+        Exchange exchange = Mockito.mock(Exchange.class);
+        Message message = Mockito.mock(Message.class);
+        Exchange exchange2 = Mockito.mock(Exchange.class);
+        Mockito.when(exchange.getIn()).thenReturn(message);
+        Mockito.when(message.getExchange()).thenReturn(exchange2);
+        // policy found + deployed
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(true);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(true);
+        PolicyComponent policy = new PolicyComponent();
+        ExternalComponentState notSent = new ExternalComponentState("NOT_SENT",
+                "The policies defined have NOT yet been created on the policy engine", 90);
+        policy.setState(notSent);
+        ExternalComponentState state = policy.computeState(exchange);
+        assertThat(state.getStateName()).isEqualTo("NOT_SENT");
+        // policy found + not deployed
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(true);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(false);
+        ExternalComponentState state2 = policy.computeState(exchange);
+        assertThat(state2.getStateName()).isEqualTo("NOT_SENT");
+        // policy not found + not deployed
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(false);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(false);
+        ExternalComponentState state4 = policy.computeState(exchange);
+        assertThat(state4.getStateName()).isEqualTo("NOT_SENT");
+        // policy not found + deployed
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(false);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(true);
+        ExternalComponentState state3 = policy.computeState(exchange);
+        assertThat(state3.getStateName()).isEqualTo("IN_ERROR");
+    }
+
+
+    /**
+    * Test the computeState method. 
+    * oldState           newState        expectedFinalState
+    * SENT                 SENT                SENT
+    * SENT          SENT_AND_DEPLOYED          SENT
+    * SENT              IN_ERROR              IN_ERROR
+    * SENT              NOT_SENT              NOT_SENT
+    */
+    @Test
+    public void computeStateTestOriginalStateSent() throws IOException {
+        Exchange exchange = Mockito.mock(Exchange.class);
+        Message message = Mockito.mock(Message.class);
+        Exchange exchange2 = Mockito.mock(Exchange.class);
+        Mockito.when(exchange.getIn()).thenReturn(message);
+        Mockito.when(message.getExchange()).thenReturn(exchange2);
+        PolicyComponent policy = new PolicyComponent();
+        ExternalComponentState sent = new ExternalComponentState("SENT",
+                "The policies defined have been created but NOT deployed on the policy engine", 50);
+        policy.setState(sent);
+        // new policy state SENT
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(true);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(false);
+        ExternalComponentState state = policy.computeState(exchange);
+        assertThat(state.getStateName()).isEqualTo("SENT");
+        // new policy state SENT_AND_DEPLOYED
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(true);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(true);
+        ExternalComponentState state2 = policy.computeState(exchange);
+        assertThat(state2.getStateName()).isEqualTo("SENT");
+        // new policy state IN_ERROR
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(false);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(true);
+        ExternalComponentState state3 = policy.computeState(exchange);
+        assertThat(state3.getStateName()).isEqualTo("IN_ERROR");
+        // new policy state NOT_SENT
+        policy.setState(sent);
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(false);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(false);
+        ExternalComponentState state4 = policy.computeState(exchange);
+        assertThat(state4.getStateName()).isEqualTo("NOT_SENT");
+    }
+
+    /**
+    * Test the computeState method. 
+    * oldState                   newState        expectedFinalState
+    * SENT_AND_DEPLOYED     SENT_AND_DEPLOYED    SENT_AND_DEPLOYED
+    * SENT_AND_DEPLOYED            SENT                SENT
+    * SENT_AND_DEPLOYED          IN_ERROR            IN_ERROR
+    * SENT_AND_DEPLOYED          NOT_SENT            NOT_SENT
+    */
+    @Test
+    public void computeStateTestOriginalStateSentAndDeployed() throws IOException {
+        Exchange exchange = Mockito.mock(Exchange.class);
+        Message message = Mockito.mock(Message.class);
+        Exchange exchange2 = Mockito.mock(Exchange.class);
+        Mockito.when(exchange.getIn()).thenReturn(message);
+        Mockito.when(message.getExchange()).thenReturn(exchange2);
+        PolicyComponent policy = new PolicyComponent();
+        ExternalComponentState sendDeployed = new ExternalComponentState("SENT_AND_DEPLOYED",
+                "The policies defined have been created and deployed on the policy engine", 10);
+        policy.setState(sendDeployed);
+        // new policy state SENT_AND_DEPLOYED
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(true);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(true);
+        ExternalComponentState state = policy.computeState(exchange);
+        assertThat(state.getStateName()).isEqualTo("SENT_AND_DEPLOYED");
+        // new policy state SENT
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(true);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(false);
+        ExternalComponentState state2 = policy.computeState(exchange);
+        assertThat(state2.getStateName()).isEqualTo("SENT");
+        // new policy state IN_ERROR
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(false);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(true);
+        ExternalComponentState state3 = policy.computeState(exchange);
+        assertThat(state3.getStateName()).isEqualTo("IN_ERROR");
+        // new policy state NOT_SENT
+        policy.setState(sendDeployed);
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(false);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(false);
+        ExternalComponentState state4 = policy.computeState(exchange);
+        assertThat(state4.getStateName()).isEqualTo("NOT_SENT");
+    }
+
+
+    /**
+    * Test the computeState method. 
+    * oldState           newState        expectedFinalState
+    * IN_ERROR     SENT_AND_DEPLOYED         IN_ERROR
+    * IN_ERROR            SENT               IN_ERROR
+    * IN_ERROR          IN_ERROR             IN_ERROR
+    * IN_ERROR          NOT_SENT             IN_ERROR
+    */
+    @Test
+    public void computeStateTestOriginalStateInError() throws IOException {
+        Exchange exchange = Mockito.mock(Exchange.class);
+        Message message = Mockito.mock(Message.class);
+        Exchange exchange2 = Mockito.mock(Exchange.class);
+        Mockito.when(exchange.getIn()).thenReturn(message);
+        Mockito.when(message.getExchange()).thenReturn(exchange2);
+        PolicyComponent policy = new PolicyComponent();
+        ExternalComponentState inError = new ExternalComponentState("IN_ERROR",
+                "There was an error during the sending to policy, the policy engine may be corrupted or inconsistent",
+                100);
+        policy.setState(inError);
+        // new policy state SENT_AND_DEPLOYED
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(true);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(true);
+        ExternalComponentState state = policy.computeState(exchange);
+        assertThat(state.getStateName()).isEqualTo("IN_ERROR");
+        // new policy state SENT
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(true);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(false);
+        ExternalComponentState state2 = policy.computeState(exchange);
+        assertThat(state2.getStateName()).isEqualTo("IN_ERROR");
+        // new policy state IN_ERROR
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(false);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(true);
+        ExternalComponentState state3 = policy.computeState(exchange);
+        assertThat(state3.getStateName()).isEqualTo("IN_ERROR");
+        // new policy state NOT_SENT
+        Mockito.when(exchange2.getProperty("policyFound")).thenReturn(false);
+        Mockito.when(exchange2.getProperty("policyDeployed")).thenReturn(false);
+        ExternalComponentState state4 = policy.computeState(exchange);
+
+        assertThat(state4.getStateName()).isEqualTo("IN_ERROR");
+    }
+}
diff --git a/ui-react/src/LoopUI.test.js b/ui-react/src/LoopUI.test.js
new file mode 100644
index 0000000..e28096b
--- /dev/null
+++ b/ui-react/src/LoopUI.test.js
@@ -0,0 +1,171 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights
+ *                             reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ *
+ */
+import React from 'react';
+import { shallow } from 'enzyme';
+import LoopUI from './LoopUI';
+
+import LoopCache from './api/LoopCache';
+import LoopActionService from './api/LoopActionService';
+import LoopService from './api/LoopService';
+
+describe('Verify LoopUI', () => {
+	beforeEach(() => {
+		fetch.resetMocks();
+		fetch.mockImplementation(() => {
+			return Promise.resolve({
+				ok: true,
+				status: 200,
+				text: () => "testUser"
+
+			});
+		});
+	})
+
+	const loopCache = new LoopCache({
+		"name": "LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca",
+		"components": {
+			"POLICY": {
+				"componentState": {
+					"stateName": "UNKNOWN",
+					"description": "The policies defined have NOT yet been created on the policy engine"
+				}
+			},
+			"DCAE": {
+				"componentState": {
+					"stateName": "BLUEPRINT_DEPLOYED",
+					"description": "The DCAE blueprint has been found in the DCAE inventory but not yet instancianted for this loop"
+				}
+			}
+		}
+	});
+
+	it('Test the render method', async () => {
+		const flushPromises = () => new Promise(setImmediate);
+
+		const component = shallow(<LoopUI />)
+		component.setState({
+			loopName: "testLoopName",
+			showAlert: false 
+		});
+		await flushPromises();
+		expect(component).toMatchSnapshot();
+	});
+
+	test('Test closeLoop method', () => {
+		const historyMock = { push: jest.fn() };
+		const component = shallow(<LoopUI history={historyMock}/>)
+		const instance = component.instance();
+		instance.closeLoop();
+			
+		expect(component.state('loopName')).toEqual("Empty (NO loop loaded yet)");
+		expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
+	})
+
+	test('Test logout method', async () => {
+		const flushPromises = () => new Promise(setImmediate);
+		const component = shallow(<LoopUI />)
+		const instance = component.instance();
+		instance.logout();
+		await flushPromises();
+		expect(component.state('userName')).toEqual("testUser");
+	})
+
+	test('Test loadLoop method refresh suc', async () => {
+		const historyMock = { push: jest.fn() };
+		LoopService.getLoop = jest.fn().mockImplementation(() => {
+			return Promise.resolve({
+				ok: true,
+				status: 200,
+				text: () => {}
+			});
+		});
+
+		LoopActionService.refreshStatus = jest.fn().mockImplementation(() => {
+			return Promise.resolve({name: "LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca"});
+		});
+
+		const flushPromises = () => new Promise(setImmediate);
+		const component = shallow(<LoopUI history={historyMock}/>)
+		const instance = component.instance();
+		instance.loadLoop("LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca");
+
+		await flushPromises();
+
+		const resLoopCache = instance.getLoopCache();
+			
+		expect(resLoopCache.getComponentStates()).toBeUndefined();
+		expect(component.state('loopName')).toEqual("LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca");
+	})
+
+	test('Test loadLoop method refresh fail', async () => {
+		const historyMock = { push: jest.fn() };
+		LoopService.getLoop = jest.fn().mockImplementation(() => {
+			return Promise.resolve({
+			name: "LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca",
+			"components": {
+				"POLICY": {
+					"componentState": {
+						"stateName": "UNKNOWN",
+						"description": "The policies defined have NOT yet been created on the policy engine"
+					}
+				},
+				"DCAE": {
+					"componentState": {
+						"stateName": "BLUEPRINT_DEPLOYED",
+						"description": "The DCAE blueprint has been found in the DCAE inventory but not yet instancianted for this loop"
+					}
+				}
+			}});
+		});
+
+		LoopActionService.refreshStatus = jest.fn().mockImplementation(() => {
+			return Promise.reject({error: "whatever"});
+		});
+
+		const flushPromises = () => new Promise(setImmediate);
+		const component = shallow(<LoopUI history={historyMock}/>)
+		const instance = component.instance();
+		instance.loadLoop("LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca");
+
+		await flushPromises();
+
+		const resLoopCache = instance.getLoopCache();
+			
+		expect(resLoopCache).toEqual(loopCache);
+		expect(component.state('loopName')).toEqual("LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca");
+	})
+
+	test('Test alert methods', () => {
+		const component = shallow(<LoopUI />)
+		expect(component.state('showAlert')).toEqual(false);
+
+		const instance = component.instance();
+		instance.showAlert("testAlert");
+		expect(component.state('showAlert')).toEqual(true);
+		expect(component.state('showMessage')).toEqual("testAlert");
+
+		instance.disableAlert();
+			
+		expect(component.state('showAlert')).toEqual(false);
+	})
+});
diff --git a/ui-react/src/NotFound.test.js b/ui-react/src/NotFound.test.js
new file mode 100644
index 0000000..3a5fc10
--- /dev/null
+++ b/ui-react/src/NotFound.test.js
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights
+ *                             reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ *
+ */
+import React from 'react';
+import { shallow } from 'enzyme';
+import NotFound from './NotFound';
+
+describe('Verify OnapClamp', () => {
+
+	it('Test the render method',  () => {
+
+		const component = shallow(<NotFound />)
+
+		expect(component).toMatchSnapshot();
+	});
+
+});
diff --git a/ui-react/src/OnapClamp.test.js b/ui-react/src/OnapClamp.test.js
new file mode 100644
index 0000000..c3336a9
--- /dev/null
+++ b/ui-react/src/OnapClamp.test.js
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2019 AT&T Intellectual Property. All rights
+ *                             reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ *
+ */
+import React from 'react';
+import { shallow } from 'enzyme';
+import OnapClamp from './OnapClamp';
+
+describe('Verify OnapClamp', () => {
+
+	it('Test the render method',  () => {
+
+		const component = shallow(<OnapClamp />)
+
+		expect(component).toMatchSnapshot();
+	});
+
+});
diff --git a/ui-react/src/__snapshots__/LoopUI.test.js.snap b/ui-react/src/__snapshots__/LoopUI.test.js.snap
new file mode 100644
index 0000000..ecf439e
--- /dev/null
+++ b/ui-react/src/__snapshots__/LoopUI.test.js.snap
@@ -0,0 +1,154 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Verify LoopUI Test the render method 1`] = `
+<styled.div
+  id="main_div"
+>
+  <Route
+    path="/operationalPolicyModal"
+    render={[Function]}
+  />
+  <Route
+    path="/configurationPolicyModal/:componentName"
+    render={[Function]}
+  />
+  <Route
+    path="/openLoop"
+    render={[Function]}
+  />
+  <Route
+    path="/loopProperties"
+    render={[Function]}
+  />
+  <Route
+    path="/userInfo"
+    render={[Function]}
+  />
+  <Route
+    path="/closeLoop"
+    render={[Function]}
+  />
+  <Route
+    path="/submit"
+    render={[Function]}
+  />
+  <Route
+    path="/stop"
+    render={[Function]}
+  />
+  <Route
+    path="/restart"
+    render={[Function]}
+  />
+  <Route
+    path="/delete"
+    render={[Function]}
+  />
+  <Route
+    path="/undeploy"
+    render={[Function]}
+  />
+  <Route
+    path="/deploy"
+    render={[Function]}
+  />
+  <Route
+    path="/refreshStatus"
+    render={[Function]}
+  />
+  <Route
+    path="/logout"
+    render={[Function]}
+  />
+  <GlobalStyleComponent />
+  <Alert
+    closeLabel="Close alert"
+    dismissible={true}
+    onClose={[Function]}
+    show={false}
+    transition={
+      Object {
+        "$$typeof": Symbol(react.forward_ref),
+        "defaultProps": Object {
+          "appear": false,
+          "in": false,
+          "mountOnEnter": false,
+          "timeout": 300,
+          "unmountOnExit": false,
+        },
+        "displayName": "Fade",
+        "render": [Function],
+      }
+    }
+    variant="danger"
+  />
+  <Navbar
+    collapseOnSelect={false}
+    expand={true}
+    variant="light"
+  >
+    <NavbarBrand>
+      <img
+        alt=""
+        height="50px"
+        src={null}
+        width="234px"
+      />
+      <styled.a>
+        CLAMP
+      </styled.a>
+    </NavbarBrand>
+    <NavbarToggle
+      aria-controls="responsive-navbar-nav"
+      label="Toggle navigation"
+    />
+    <MenuBar
+      loopName="testLoopName"
+    />
+    <NavbarText>
+      <styled.a>
+        Signed in as: 
+      </styled.a>
+      <Styled(Link)
+        to="/userInfo"
+      >
+        testUser
+      </Styled(Link)>
+      <Styled(Link)
+        to="/logout/"
+      >
+         (logout)
+      </Styled(Link)>
+    </NavbarText>
+  </Navbar>
+  <styled.div>
+    <styled.div>
+      Loop Viewer - 
+      testLoopName
+    </styled.div>
+    <styled.div>
+      <withRouter(LoopViewSvg)
+        loopCache={
+          LoopCache {
+            "loopJsonCache": Object {},
+          }
+        }
+      />
+      <LoopStatus
+        loopCache={
+          LoopCache {
+            "loopJsonCache": Object {},
+          }
+        }
+      />
+      <LoopLogs
+        loopCache={
+          LoopCache {
+            "loopJsonCache": Object {},
+          }
+        }
+      />
+    </styled.div>
+  </styled.div>
+</styled.div>
+`;
diff --git a/ui-react/src/__snapshots__/NotFound.test.js.snap b/ui-react/src/__snapshots__/NotFound.test.js.snap
new file mode 100644
index 0000000..86bcfd1
--- /dev/null
+++ b/ui-react/src/__snapshots__/NotFound.test.js.snap
@@ -0,0 +1,26 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Verify OnapClamp Test the render method 1`] = `
+<div
+  id="main"
+>
+  <div
+    class="divRow"
+  >
+    <b>
+      Page Not Found!
+    </b>
+  </div>
+  <div
+    class="divRow"
+  >
+    Please cick 
+    <a
+      href="/"
+    >
+      here
+    </a>
+     to go back to the main page.
+  </div>
+</div>
+`;
diff --git a/ui-react/src/__snapshots__/OnapClamp.test.js.snap b/ui-react/src/__snapshots__/OnapClamp.test.js.snap
new file mode 100644
index 0000000..751c94b
--- /dev/null
+++ b/ui-react/src/__snapshots__/OnapClamp.test.js.snap
@@ -0,0 +1,176 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Verify OnapClamp Test the render method 1`] = `
+<ThemeProvider
+  theme={
+    Object {
+      "backgroundColor": "#eeeeee",
+      "fontDanger": "#eb238e",
+      "fontDark": "#888888",
+      "fontFamily": "Arial, Sans-serif",
+      "fontHighlight": "#ffff00",
+      "fontLight": "#ffffff",
+      "fontNormal": "black",
+      "fontSize": "16px",
+      "fontWarning": "#eb238e",
+      "loopViewerBackgroundColor": "white",
+      "loopViewerFontColor": "yellow",
+      "loopViewerHeaderBackgroundColor": "#337ab7",
+      "loopViewerHeaderFontColor": "white",
+      "menuBackgroundColor": "white",
+      "menuFontColor": "black",
+      "menuHighlightedBackgroundColor": "#337ab7",
+      "menuHighlightedFontColor": "white",
+    }
+  }
+>
+  <styled.div
+    id="main_div"
+  >
+    <Route
+      path="/operationalPolicyModal"
+      render={[Function]}
+    />
+    <Route
+      path="/configurationPolicyModal/:componentName"
+      render={[Function]}
+    />
+    <Route
+      path="/openLoop"
+      render={[Function]}
+    />
+    <Route
+      path="/loopProperties"
+      render={[Function]}
+    />
+    <Route
+      path="/userInfo"
+      render={[Function]}
+    />
+    <Route
+      path="/closeLoop"
+      render={[Function]}
+    />
+    <Route
+      path="/submit"
+      render={[Function]}
+    />
+    <Route
+      path="/stop"
+      render={[Function]}
+    />
+    <Route
+      path="/restart"
+      render={[Function]}
+    />
+    <Route
+      path="/delete"
+      render={[Function]}
+    />
+    <Route
+      path="/undeploy"
+      render={[Function]}
+    />
+    <Route
+      path="/deploy"
+      render={[Function]}
+    />
+    <Route
+      path="/refreshStatus"
+      render={[Function]}
+    />
+    <Route
+      path="/logout"
+      render={[Function]}
+    />
+    <GlobalStyleComponent />
+    <Alert
+      closeLabel="Close alert"
+      dismissible={true}
+      onClose={[Function]}
+      show={false}
+      transition={
+        Object {
+          "$$typeof": Symbol(react.forward_ref),
+          "defaultProps": Object {
+            "appear": false,
+            "in": false,
+            "mountOnEnter": false,
+            "timeout": 300,
+            "unmountOnExit": false,
+          },
+          "displayName": "Fade",
+          "render": [Function],
+        }
+      }
+      variant="danger"
+    />
+    <Navbar
+      collapseOnSelect={false}
+      expand={true}
+      variant="light"
+    >
+      <NavbarBrand>
+        <img
+          alt=""
+          height="50px"
+          src={null}
+          width="234px"
+        />
+        <styled.a>
+          CLAMP
+        </styled.a>
+      </NavbarBrand>
+      <NavbarToggle
+        aria-controls="responsive-navbar-nav"
+        label="Toggle navigation"
+      />
+      <MenuBar
+        loopName="Empty (NO loop loaded yet)"
+      />
+      <NavbarText>
+        <styled.a>
+          Signed in as: 
+        </styled.a>
+        <Styled(Link)
+          to="/userInfo"
+        />
+        <Styled(Link)
+          to="/logout/"
+        >
+           (logout)
+        </Styled(Link)>
+      </NavbarText>
+    </Navbar>
+    <styled.div>
+      <styled.div>
+        Loop Viewer - 
+        Empty (NO loop loaded yet)
+      </styled.div>
+      <styled.div>
+        <withRouter(LoopViewSvg)
+          loopCache={
+            LoopCache {
+              "loopJsonCache": Object {},
+            }
+          }
+        />
+        <LoopStatus
+          loopCache={
+            LoopCache {
+              "loopJsonCache": Object {},
+            }
+          }
+        />
+        <LoopLogs
+          loopCache={
+            LoopCache {
+              "loopJsonCache": Object {},
+            }
+          }
+        />
+      </styled.div>
+    </styled.div>
+  </styled.div>
+</ThemeProvider>
+`;
