diff --git a/docs/images/user-guide/clamp-cds-operation.png b/docs/images/user-guide/clamp-cds-operation.png
new file mode 100755
index 0000000..edc4c63
--- /dev/null
+++ b/docs/images/user-guide/clamp-cds-operation.png
Binary files differ
diff --git a/docs/images/user-guide/create-loop.png b/docs/images/user-guide/create-loop.png
index 20b9f05..40cdb4c 100644
--- a/docs/images/user-guide/create-loop.png
+++ b/docs/images/user-guide/create-loop.png
Binary files differ
diff --git a/docs/images/user-guide/loop-menu.png b/docs/images/user-guide/loop-menu.png
index 658359e..b605634 100644
--- a/docs/images/user-guide/loop-menu.png
+++ b/docs/images/user-guide/loop-menu.png
Binary files differ
diff --git a/docs/images/user-guide/open-menu-prop.png b/docs/images/user-guide/open-menu-prop.png
index c07b225..046e2a3 100755
--- a/docs/images/user-guide/open-menu-prop.png
+++ b/docs/images/user-guide/open-menu-prop.png
Binary files differ
diff --git a/docs/user-guide.rst b/docs/user-guide.rst
index bfac885..b3c1535 100644
--- a/docs/user-guide.rst
+++ b/docs/user-guide.rst
@@ -94,7 +94,10 @@
 
 |clamp-op-policy-box-policy|
 
+Operations and payload for CDS actor is fetched from CDS.
+Clamp receives CDS blueprint name and version information from sdnc_model_name and sdnc_model_version properties in CSAR distributed by SDC and queries CDS to get list of operations and payload for the corresponding CDS blueprint.
 
+|clamp-cds-operation|
 
 Micro-service policy properties
 -------------------------------
@@ -151,3 +154,4 @@
 .. |clamp-policy-submitted| image:: images/user-guide/policy-submitted.png
 .. |clamp-deploy-params| image:: images/user-guide/deploy-params.png
 .. |blueprint-node| image:: images/user-guide/blueprint_node_type.png
+.. |clamp-cds-operation| image:: images/user-guide/clamp-cds-operation.png
diff --git a/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateFieldTest.java b/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateFieldTest.java
new file mode 100644
index 0000000..29f5a1d
--- /dev/null
+++ b/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateFieldTest.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2020 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.clds.tosca.update;
+
+import junit.framework.TestCase;
+import org.onap.clamp.clds.tosca.update.templates.JsonTemplateField;
+
+public class JsonTemplateFieldTest extends TestCase {
+
+    JsonTemplateField field1 = new JsonTemplateField("type", "testType", true, true);
+    JsonTemplateField field2 = new JsonTemplateField("type");
+    JsonTemplateField field3 = new JsonTemplateField("type", "testType1", true, true);
+    JsonTemplateField field4 = new JsonTemplateField("type", "testType", false, true);
+    JsonTemplateField field5 = new JsonTemplateField("type", "testType", true, false);
+    JsonTemplateField field6 = new JsonTemplateField("type", "testType", true, true);
+
+    /**
+     * Test fieldsEqual method.
+     */
+    public void testFieldsEqualsMethod() {
+        assertFalse(JsonTemplateField.fieldsEquals(field1,field3));
+        assertFalse(JsonTemplateField.fieldsEquals(field1,field4));
+        assertFalse(JsonTemplateField.fieldsEquals(field1,field5));
+        assertTrue(JsonTemplateField.fieldsEquals(field1,field6));
+    }
+
+    /**
+     * Test equals method.
+     */
+    public void testEqualsMethod() {
+        assertTrue(field1.equals(field2));
+        assertTrue(field1.equals(field3));
+        assertTrue(field1.equals(field4));
+        assertTrue(field1.equals(field5));
+        assertTrue(field1.equals(field6));
+    }
+
+    /**
+     * Test compareWithField method.
+     */
+    public void testCompareWithFieldMethod() {
+        assertFalse(field1.compareWithField(field2));
+        assertFalse(field1.compareWithField(field3));
+        assertFalse(field1.compareWithField(field4));
+        assertFalse(field1.compareWithField(field5));
+        assertTrue(field1.equals(field6));
+    }
+}
\ No newline at end of file
diff --git a/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateTest.java b/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateTest.java
index fab3030..dc736a4 100644
--- a/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateTest.java
+++ b/src/test/java/org/onap/clamp/clds/tosca/update/JsonTemplateTest.java
@@ -32,20 +32,38 @@
 
 public class JsonTemplateTest extends TestCase {
 
+    JsonTemplate toTest = new JsonTemplate("toTest");
+    List<JsonTemplateField>
+            jsonTemplateFields = new ArrayList<>(
+            Arrays.asList(new JsonTemplateField("type"), new JsonTemplateField("description"),
+                    new JsonTemplateField(
+                            "enum")));
+
     /**
      * Test check failed.
      */
     public void testCheckFields() {
-        JsonTemplate toTest = new JsonTemplate("toTest");
-        List<JsonTemplateField>
-                jsonTemplateFields = new ArrayList<>(
-                Arrays.asList(new JsonTemplateField("type"), new JsonTemplateField("description"),
-                        new JsonTemplateField(
-                                "enum")));
         toTest.setJsonTemplateFields(jsonTemplateFields);
         JsonTemplate reference = new JsonTemplate("toTest");
         reference.setJsonTemplateFields(jsonTemplateFields);
         assertTrue(toTest.checkFields(reference));
     }
 
+    /**
+     * Test other methods.
+     */
+    public void testOtherFields() {
+        toTest.setJsonTemplateFields(jsonTemplateFields);
+        toTest.addField(new JsonTemplateField("moreField"));
+        toTest.setVisibility("moreField", true);
+        toTest.setStatic("moreField", true);
+        toTest.updateValueField("moreField", "testValue");
+        
+        assertTrue(toTest.isVisible("moreField"));
+        assertTrue(toTest.getSpecificField("moreField").getValue().equals("testValue"));
+        assertTrue(toTest.fieldStaticStatus("moreField"));
+        assertTrue(toTest.toString()
+            .equals(" templateFields : [type null null null, description null null null, "
+            + "enum null null null, moreField testValue true true]"));
+    }
 }
\ No newline at end of file
diff --git a/src/test/java/org/onap/clamp/loop/LoopTemplateLoopElementModelTest.java b/src/test/java/org/onap/clamp/loop/LoopTemplateLoopElementModelTest.java
new file mode 100644
index 0000000..e5b64c9
--- /dev/null
+++ b/src/test/java/org/onap/clamp/loop/LoopTemplateLoopElementModelTest.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2020 AT&T Intellectual Property. All rights
+ *                             reserved.
+ * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
+ *  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.template.LoopElementModel;
+import org.onap.clamp.loop.template.LoopTemplate;
+import org.onap.clamp.loop.template.LoopTemplateLoopElementModel;
+import org.onap.clamp.loop.template.PolicyModel;
+
+
+public class LoopTemplateLoopElementModelTest {
+
+    private LoopElementModel loopElementModel = getLoopElementModel("yaml", "microService1",
+        getPolicyModel("org.onap.policy.drools", "yaml", "1.0.0", "Drools", "type1"));
+    private LoopTemplate loopTemplate = getLoopTemplate("templateName", "yaml", "svg", 1);
+
+    private LoopElementModel getLoopElementModel(String yaml, String name, PolicyModel policyModel) {
+        LoopElementModel model = new LoopElementModel();
+        model.setBlueprint(yaml);
+        model.setName(name);
+        model.addPolicyModel(policyModel);
+        model.setLoopElementType("OPERATIONAL_POLICY");
+        return model;
+    }
+
+    private PolicyModel getPolicyModel(String policyType, String policyModelTosca, String version, String policyAcronym,
+                                       String policyVariant) {
+        return new PolicyModel(policyType, policyModelTosca, version, policyAcronym);
+    }
+
+    private LoopTemplate getLoopTemplate(String name, String blueprint, String svgRepresentation,
+                                         Integer maxInstancesAllowed) {
+        LoopTemplate template = new LoopTemplate(name, blueprint, svgRepresentation, maxInstancesAllowed, null);
+        template.addLoopElementModel(loopElementModel);
+        return template;
+    }
+
+    /**
+     * This tests compareTo method.
+     */
+    @Test
+    public void compareToTest() {
+        LoopTemplateLoopElementModel model1 = new LoopTemplateLoopElementModel();
+        LoopTemplateLoopElementModel model2 = new LoopTemplateLoopElementModel();
+        assertThat(model1.compareTo(model2)).isEqualTo(1);
+
+        model1.setFlowOrder(2);
+        assertThat(model1.compareTo(model2)).isEqualTo(-1);
+
+        model2.setFlowOrder(3);
+        assertThat(model1.compareTo(model2)).isEqualTo(1);
+    }
+
+    /**
+     * This tests equals method.
+     */
+    @Test
+    public void equalsTest() {
+        LoopTemplateLoopElementModel model1 = new LoopTemplateLoopElementModel();
+        LoopTemplateLoopElementModel model2 = new LoopTemplateLoopElementModel();
+
+        assertThat(model1.equals(model2)).isTrue();
+
+        model1.setLoopTemplate(loopTemplate);
+        assertThat(model1.equals(model2)).isFalse();
+        model2.setLoopTemplate(loopTemplate);
+        assertThat(model1.equals(model2)).isTrue();
+
+        model1.setLoopElementModel(loopElementModel);
+        assertThat(model1.equals(model2)).isFalse();
+        model2.setLoopElementModel(loopElementModel);
+        assertThat(model1.equals(model2)).isTrue();
+
+        model1.setFlowOrder(1);
+        assertThat(model1.equals(model2)).isTrue();
+        model2.setFlowOrder(2);
+        assertThat(model1.equals(model2)).isTrue();
+    }
+
+}
diff --git a/src/test/java/org/onap/clamp/policy/pdpgroup/PolicyModelKeyTest.java b/src/test/java/org/onap/clamp/policy/pdpgroup/PolicyModelKeyTest.java
new file mode 100644
index 0000000..413ce60
--- /dev/null
+++ b/src/test/java/org/onap/clamp/policy/pdpgroup/PolicyModelKeyTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2020 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.policy.pdpgroup;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.IOException;
+import org.junit.Test;
+
+public class PolicyModelKeyTest {
+
+    @Test
+    public void testEqualsMethod() throws IOException {
+        PolicyModelKey key1 = new PolicyModelKey("name1","1.0.0");
+        PolicyModelKey key2 = new PolicyModelKey(null,"1.0.0");
+        PolicyModelKey key3 = new PolicyModelKey("name1",null);
+
+        assertThat(key1.equals(null)).isFalse();
+        assertThat(key1.equals("key2")).isFalse();
+
+        assertThat(key2.equals(key1)).isFalse();
+        assertThat(key3.equals(key1)).isFalse();
+
+        PolicyModelKey key4 = new PolicyModelKey("name2","1.0.0");
+        PolicyModelKey key5 = new PolicyModelKey("name1","2.0.0");
+        assertThat(key1.equals(key4)).isFalse();
+        assertThat(key1.equals(key5)).isFalse();
+
+        PolicyModelKey key6 = new PolicyModelKey("name(.*)","1.0.0");
+        PolicyModelKey key7 = new PolicyModelKey("name1","1.0.0");
+        assertThat(key1.equals(key6)).isTrue();
+        assertThat(key1.equals(key7)).isTrue();
+    }
+}
diff --git a/ui-react/src/api/LoopCache.test.js b/ui-react/src/api/LoopCache.test.js
index b0eef75..3ae0817 100644
--- a/ui-react/src/api/LoopCache.test.js
+++ b/ui-react/src/api/LoopCache.test.js
@@ -39,7 +39,9 @@
             "policies": []
           }
         },
-       "jsonRepresentation": {
+        "pdpGroup": "pdpGroupTest",
+        "pdpSubgroup": "pdpSubgroupTest",
+        "jsonRepresentation": {
         "schema": {}
       }
       }];
@@ -54,7 +56,9 @@
             "controlLoop": {},
             "policies": []
           }
-        }
+        },
+        "pdpGroup": "pdpGroupTest",
+        "pdpSubgroup": "pdpSubgroupTest",
       }];
       expect(loopCache.getOperationalPoliciesNoJsonSchema()).toStrictEqual(opPolicy);
     });
@@ -92,6 +96,9 @@
           "modelType": "onap.policies.monitoring.cdap.tca.hi.lo.app",
           "configurationsJson": {"domain": "measurementsForVfScaling"},
           "shared": false,
+          "pdpGroup": "pdpGroupTest",
+          "pdpSubgroup": "pdpSubgroupTest",
+          "policyModel": {"policyPdpGroup": {"supportedPdpGroups": "supportedPdpGroupsTest"}},
           "jsonRepresentation": {"schema": {}}
       };
       expect(loopCache.getMicroServiceForName("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(msJson);
@@ -180,6 +187,84 @@
       expect(loopCache.getComponentStates()).toStrictEqual(component);
     });
 
+    it('getOperationalPolicyForName', () => {
+      const opPolicy = {
+      "name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
+      "configurationsJson": {
+        "operational_policy": {
+          "controlLoop": {},
+          "policies": []
+        }
+      },
+      "pdpGroup": "pdpGroupTest",
+      "pdpSubgroup": "pdpSubgroupTest",
+      "jsonRepresentation": {
+        "schema": {}
+      }
+    };
+      expect(loopCache.getOperationalPolicyForName("OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(opPolicy);
+      expect(loopCache.getOperationalPolicyForName("Not_Exist")).toBeNull();
+    });
+
+    it('getOperationalPolicyPropertiesForName', () => {
+      const opPolicyJson = {
+        "operational_policy": {
+          "controlLoop": {},
+          "policies": []
+        }};
+      expect(loopCache.getOperationalPolicyPropertiesForName("OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(opPolicyJson);
+      expect(loopCache.getOperationalPolicyPropertiesForName("Not_Exist")).toBeNull();
+    });
+
+    it('getOperationalPolicyJsonRepresentationForName', () => {
+      const opPolicySchema = {
+        "schema": {}
+      };
+      expect(loopCache.getOperationalPolicyJsonRepresentationForName("OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(opPolicySchema);
+      expect(loopCache.getOperationalPolicyJsonRepresentationForName("Not_Exist")).toBeNull();
+    });
+
+    it('getOperationalPolicySupportedPdpGroup', () => {
+      expect(loopCache.getOperationalPolicySupportedPdpGroup("Not_Exist")).toStrictEqual([]);
+    });
+
+    it('getOperationalPolicyPdpGroup', () => {
+      expect(loopCache.getOperationalPolicyPdpGroup("OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual("pdpGroupTest");
+      expect(loopCache.getOperationalPolicyPdpGroup("Not_Exist")).toBeNull();
+    });
+
+    it('getOperationalPolicyPdpSubgroup', () => {
+      expect(loopCache.getOperationalPolicyPdpSubgroup("OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual("pdpSubgroupTest");
+      expect(loopCache.getOperationalPolicyPdpSubgroup("Not_Exist")).toBeNull();
+    });
+
+    it('getMicroServiceSupportedPdpGroup', () => {
+      expect(loopCache.getMicroServiceSupportedPdpGroup("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual("supportedPdpGroupsTest");
+      expect(loopCache.getMicroServiceSupportedPdpGroup("Not_Exist")).toStrictEqual([]);
+    });
+
+    it('getMicroServicePdpGroup', () => {
+      expect(loopCache.getMicroServicePdpGroup("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual("pdpGroupTest");
+      expect(loopCache.getMicroServicePdpGroup("Not_Exist")).toBeNull();
+    });
+
+    it('getMicroServicePdpSubgroup', () => {
+      expect(loopCache.getMicroServicePdpSubgroup("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual("pdpSubgroupTest");
+      expect(loopCache.getMicroServicePdpSubgroup("Not_Exist")).toBeNull();
+    });
+
+    it('getMicroServiceJsonRepresentationForName', () => {
+      const msPolicySchema = {
+        "schema": {}
+      };
+      expect(loopCache.getMicroServiceJsonRepresentationForName("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(msPolicySchema);
+      expect(loopCache.getMicroServiceJsonRepresentationForName("Not_Exist")).toBeNull();
+    });
+
+    it('getTemplateName', () => {
+      expect(loopCache.getTemplateName()).toStrictEqual("loopTemplateTest");
+    });
+
     it('updateGlobalProperties', () => {
       const newGlobalProps = {
         "dcaeDeployParameters": {
@@ -208,4 +293,13 @@
       loopCache.updateMicroServiceProperties("TCA_h2NMX_v1_0_ResourceInstanceName1_tca", newMsPolicyProperties);
       expect(loopCache.getMicroServicePropertiesForName("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(newMsPolicyProperties);
     });
+
+    it('updateMicroServicePdpGroup', () => {
+      const newMsPolicyProperties = {"domain": "measurementsForVfScalingNew"};
+      loopCache.updateMicroServicePdpGroup("TCA_h2NMX_v1_0_ResourceInstanceName1_tca", "pdpGroupTest1", "pdpSubgroupTest1");
+      expect(loopCache.getMicroServicePdpGroup("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual("pdpGroupTest1");
+      expect(loopCache.getMicroServicePdpGroup("Not_Exist")).toBeNull();
+      expect(loopCache.getMicroServicePdpSubgroup("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual("pdpSubgroupTest1");
+      expect(loopCache.getMicroServicePdpSubgroup("Not_Exist")).toBeNull();
+    });
  });
diff --git a/ui-react/src/api/LoopCache_mokeLoopJsonCache.json b/ui-react/src/api/LoopCache_mokeLoopJsonCache.json
index 788306b..cb9ed87 100644
--- a/ui-react/src/api/LoopCache_mokeLoopJsonCache.json
+++ b/ui-react/src/api/LoopCache_mokeLoopJsonCache.json
@@ -8,6 +8,7 @@
       "policy_id": "TCA_h2NMX_v1_0_ResourceInstanceName1_tca"
     }
   },
+  "loopTemplate": {"name": "loopTemplateTest"},
   "modelService": {
     "serviceDetails": {
       "serviceType": "",
@@ -93,6 +94,8 @@
           "policies": []
         }
       },
+      "pdpGroup": "pdpGroupTest",
+      "pdpSubgroup": "pdpSubgroupTest",
       "jsonRepresentation": {
         "schema": {}
       }
@@ -104,6 +107,9 @@
       "modelType": "onap.policies.monitoring.cdap.tca.hi.lo.app",
       "configurationsJson": {"domain": "measurementsForVfScaling"},
       "shared": false,
+      "pdpGroup": "pdpGroupTest",
+      "pdpSubgroup": "pdpSubgroupTest",
+      "policyModel": {"policyPdpGroup": {"supportedPdpGroups": "supportedPdpGroupsTest"}},
       "jsonRepresentation": {"schema": {}}
     }
   ],
diff --git a/ui-react/src/components/dialogs/Loop/CreateLoopModal.test.js b/ui-react/src/components/dialogs/Loop/CreateLoopModal.test.js
new file mode 100644
index 0000000..18ec6fd
--- /dev/null
+++ b/ui-react/src/components/dialogs/Loop/CreateLoopModal.test.js
@@ -0,0 +1,137 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2020 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 CreateLoopModal from './CreateLoopModal';
+import LoopService from '../../../api/LoopService';
+import TemplateService from '../../../api/TemplateService';
+
+describe('Verify CreateLoopModal', () => {
+
+  it('Test the render method', async () => {
+	const flushPromises = () => new Promise(setImmediate);
+    TemplateService.getTemplateNames = jest.fn().mockImplementation(() => {
+    	return Promise.resolve(["template1","template2"]);
+	});
+	
+	const component = shallow(<CreateLoopModal/>);
+    expect(component).toMatchSnapshot();
+	await flushPromises();
+	component.update();
+		
+    expect(component.state('templateNames')).toStrictEqual([{"label": "template1", "value": "template1"}, {"label": "template2", "value": "template2"}]);
+  });
+
+  it('handleDropdownListChange event', async () => {
+  	const flushPromises = () => new Promise(setImmediate);
+    const event = {value: 'template1'};
+    TemplateService.getBlueprintMicroServiceTemplateSvg = jest.fn().mockImplementation(() => {
+		return Promise.resolve("");
+	});
+
+    const component = shallow(<CreateLoopModal/>);
+    component.find('StateManager').simulate('change', event);
+    await flushPromises();
+    component.update();
+    expect(component.state('chosenTemplateName')).toEqual("template1");
+    expect(component.state('content')).toEqual("Error1");
+    
+    TemplateService.getBlueprintMicroServiceTemplateSvg = jest.fn().mockImplementation(() => {
+		return Promise.resolve("svgContentTest");
+	});
+	component.find('StateManager').simulate('change', {value: 'template2'});
+    await flushPromises();
+    component.update();
+    expect(component.state('chosenTemplateName')).toEqual("template2");
+    expect(component.state('content')).toEqual("svgContentTest");
+  });
+
+
+
+  it('handleModelName event', () => {
+    const event = {target: {value : "model1"} };
+    const component = shallow(<CreateLoopModal/>);
+    component.find('input').simulate('change', event);
+    component.update();
+    expect(component.state('modelName')).toEqual("model1");
+  });
+
+
+  it('Test handleClose', () => {
+    const historyMock = { push: jest.fn() }; 
+    const handleClose = jest.spyOn(CreateLoopModal.prototype,'handleClose');
+    const component = shallow(<CreateLoopModal history={historyMock} />)
+
+    component.find('[variant="secondary"]').prop('onClick')();
+
+    expect(handleClose).toHaveBeenCalledTimes(1);
+    expect(component.state('show')).toEqual(false);
+    expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
+    
+    handleClose.mockClear();
+  });
+
+  it('Test handleCreate Fail', () => {
+    const handleCreate = jest.spyOn(CreateLoopModal.prototype,'handleCreate');
+    const component = shallow(<CreateLoopModal/>)
+
+    component.find('[variant="primary"]').prop('onClick')();
+
+    expect(handleCreate).toHaveBeenCalledTimes(1);
+    expect(component.state('show')).toEqual(true);
+
+    handleCreate.mockClear();
+  });
+
+  it('Test handleCreate Suc', async () => {
+	const flushPromises = () => new Promise(setImmediate);
+    const historyMock = { push: jest.fn() };
+    const loadLoopFunction = jest.fn();  
+    
+    LoopService.createLoop = jest.fn().mockImplementation(() => {
+			return Promise.resolve({
+				ok: true,
+				status: 200,
+				json: () => {}
+			});
+		});
+
+    const handleCreate = jest.spyOn(CreateLoopModal.prototype,'handleCreate');
+    const component = shallow(<CreateLoopModal history={historyMock} loadLoopFunction={loadLoopFunction}/>)
+    component.setState({
+			modelName: "modelNameTest",
+			chosenTemplateName: "template1"
+		});
+
+    component.find('[variant="primary"]').prop('onClick')();
+	await flushPromises();
+	component.update();
+
+    expect(handleCreate).toHaveBeenCalledTimes(1);
+    expect(component.state('show')).toEqual(false);
+    expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
+
+    handleCreate.mockClear();
+  });
+
+});
diff --git a/ui-react/src/components/dialogs/Loop/__snapshots__/CreateLoopModal.test.js.snap b/ui-react/src/components/dialogs/Loop/__snapshots__/CreateLoopModal.test.js.snap
new file mode 100644
index 0000000..305c87b
--- /dev/null
+++ b/ui-react/src/components/dialogs/Loop/__snapshots__/CreateLoopModal.test.js.snap
@@ -0,0 +1,141 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Verify CreateLoopModal Test the render method 1`] = `
+<Styled(Bootstrap(Modal))
+  backdrop="static"
+  keyboard={false}
+  onHide={[Function]}
+  show={true}
+  size="xl"
+>
+  <ModalHeader
+    closeButton={true}
+    closeLabel="Close"
+  >
+    <ModalTitle>
+      Create Model
+    </ModalTitle>
+  </ModalHeader>
+  <ModalBody>
+    <FormGroup
+      as={
+        Object {
+          "$$typeof": Symbol(react.forward_ref),
+          "defaultProps": Object {
+            "noGutters": false,
+          },
+          "render": [Function],
+        }
+      }
+      controlId="formPlaintextEmail"
+    >
+      <FormLabel
+        column={true}
+        sm="2"
+        srOnly={false}
+      >
+        Template Name:
+      </FormLabel>
+      <Col
+        sm="10"
+      >
+        <StateManager
+          defaultInputValue=""
+          defaultMenuIsOpen={false}
+          defaultValue={null}
+          onChange={[Function]}
+          options={Array []}
+        />
+      </Col>
+    </FormGroup>
+    <FormGroup
+      as={
+        Object {
+          "$$typeof": Symbol(react.forward_ref),
+          "defaultProps": Object {
+            "noGutters": false,
+          },
+          "render": [Function],
+        }
+      }
+      controlId="formSvgPreview"
+      style={
+        Object {
+          "alignItems": "center",
+        }
+      }
+    >
+      <FormLabel
+        column={true}
+        sm="2"
+        srOnly={false}
+      >
+        Model Preview:
+      </FormLabel>
+      <Col
+        sm="10"
+      >
+        <styled.svg
+          dangerouslySetInnerHTML={
+            Object {
+              "__html": "",
+            }
+          }
+          value=""
+        />
+      </Col>
+    </FormGroup>
+    <FormGroup
+      as={
+        Object {
+          "$$typeof": Symbol(react.forward_ref),
+          "defaultProps": Object {
+            "noGutters": false,
+          },
+          "render": [Function],
+        }
+      }
+      controlId="formPlaintextEmail"
+    >
+      <FormLabel
+        column={true}
+        sm="2"
+        srOnly={false}
+      >
+        Model Name:
+      </FormLabel>
+      <input
+        onChange={[Function]}
+        style={
+          Object {
+            "marginLeft": "1em",
+            "width": "50%",
+          }
+        }
+        type="text"
+        value=""
+      />
+    </FormGroup>
+  </ModalBody>
+  <ModalFooter>
+    <Button
+      active={false}
+      disabled={false}
+      onClick={[Function]}
+      type="null"
+      variant="secondary"
+    >
+      Cancel
+    </Button>
+    <Button
+      active={false}
+      disabled={false}
+      onClick={[Function]}
+      type="submit"
+      variant="primary"
+    >
+      Create
+    </Button>
+  </ModalFooter>
+</Styled(Bootstrap(Modal))>
+`;
