diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/AaiClientTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/AaiClientTest.java
new file mode 100644
index 0000000..8010447
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/AaiClientTest.java
@@ -0,0 +1,40 @@
+package org.onap.vid.aai;
+
+import static org.junit.Assert.*;
+import java.util.*;
+
+import org.json.simple.JSONObject;
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.vid.aai.model.AaiGetPnfs.Pnf;
+import org.onap.vid.model.SubscriberList;
+
+public class AaiClientTest {
+
+    private AaiClient createTestSubject() {
+        return new AaiClient();
+    }
+
+
+    @Test
+    public void testDoAaiGet() throws Exception {
+        AaiClient testSubject;
+        String certiPath = "";
+        String uri = "";
+        boolean xml = false;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.doAaiGet(certiPath, uri, xml);
+    }
+
+    @Test
+    public void testParseServiceSubscriptionObjectForTenants() throws Exception {
+        JSONObject jsonObject = null;
+        String result;
+
+        // default test
+        result = AaiClient.parseServiceSubscriptionObjectForTenants(jsonObject);
+    }
+
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/OperationalEnvironmentTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/OperationalEnvironmentTest.java
new file mode 100644
index 0000000..876dedb
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/OperationalEnvironmentTest.java
@@ -0,0 +1,171 @@
+package org.onap.vid.aai;
+
+import org.junit.Test;
+import org.onap.vid.aai.model.RelationshipList;
+
+public class OperationalEnvironmentTest {
+
+    private OperationalEnvironment createTestSubject() {
+        return new OperationalEnvironment();
+    }
+
+    @Test
+    public void testGetOperationalEnvironmentId() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOperationalEnvironmentId();
+    }
+
+    @Test
+    public void testSetOperationalEnvironmentId() throws Exception {
+        OperationalEnvironment testSubject;
+        String operationalEnvironmentId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOperationalEnvironmentId(operationalEnvironmentId);
+    }
+
+    @Test
+    public void testGetOperationalEnvironmentName() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOperationalEnvironmentName();
+    }
+
+    @Test
+    public void testSetOperationalEnvironmentName() throws Exception {
+        OperationalEnvironment testSubject;
+        String operationalEnvironmentName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOperationalEnvironmentName(operationalEnvironmentName);
+    }
+
+    @Test
+    public void testGetOperationalEnvironmentType() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOperationalEnvironmentType();
+    }
+
+    @Test
+    public void testSetOperationalEnvironmentType() throws Exception {
+        OperationalEnvironment testSubject;
+        String operationalEnvironmentType = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOperationalEnvironmentType(operationalEnvironmentType);
+    }
+
+    @Test
+    public void testGetOperationalEnvironmentStatus() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOperationalEnvironmentStatus();
+    }
+
+    @Test
+    public void testSetOperationalEnvironmentStatus() throws Exception {
+        OperationalEnvironment testSubject;
+        String operationalEnvironmentStatus = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOperationalEnvironmentStatus(operationalEnvironmentStatus);
+    }
+
+    @Test
+    public void testGetTenantContext() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getTenantContext();
+    }
+
+    @Test
+    public void testSetTenantContext() throws Exception {
+        OperationalEnvironment testSubject;
+        String tenantContext = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setTenantContext(tenantContext);
+    }
+
+    @Test
+    public void testGetWorkloadContext() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getWorkloadContext();
+    }
+
+    @Test
+    public void testSetWorkloadContext() throws Exception {
+        OperationalEnvironment testSubject;
+        String workloadContext = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setWorkloadContext(workloadContext);
+    }
+
+    @Test
+    public void testGetResourceVersion() throws Exception {
+        OperationalEnvironment testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getResourceVersion();
+    }
+
+    @Test
+    public void testSetResourceVersion() throws Exception {
+        OperationalEnvironment testSubject;
+        String resourceVersion = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setResourceVersion(resourceVersion);
+    }
+
+    @Test
+    public void testGetRelationshipList() throws Exception {
+        OperationalEnvironment testSubject;
+        RelationshipList result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRelationshipList();
+    }
+
+    @Test
+    public void testSetRelationshipList() throws Exception {
+        OperationalEnvironment testSubject;
+        RelationshipList relationshipList = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRelationshipList(relationshipList);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/util/AAIRestInterfaceTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/util/AAIRestInterfaceTest.java
new file mode 100644
index 0000000..35ebb66
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/util/AAIRestInterfaceTest.java
@@ -0,0 +1,76 @@
+package org.onap.vid.aai.util;
+
+import org.junit.Test;
+
+public class AAIRestInterfaceTest {
+
+    private AAIRestInterface createTestSubject() {
+        return new AAIRestInterface("");
+    }
+
+    @Test
+    public void testEncodeURL() throws Exception {
+        AAIRestInterface testSubject;
+        String nodeKey = "";
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.encodeURL(nodeKey);
+    }
+
+    @Test
+    public void testSetRestSrvrBaseURL() throws Exception {
+        AAIRestInterface testSubject;
+        String baseURL = "";
+
+        // test 1
+        testSubject = createTestSubject();
+        baseURL = null;
+        testSubject.SetRestSrvrBaseURL(baseURL);
+
+        // test 2
+        testSubject = createTestSubject();
+        baseURL = "";
+        testSubject.SetRestSrvrBaseURL(baseURL);
+    }
+
+    @Test
+    public void testGetRestSrvrBaseURL() throws Exception {
+        AAIRestInterface testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRestSrvrBaseURL();
+    }
+
+
+    @Test
+    public void testRestPut() throws Exception {
+        AAIRestInterface testSubject;
+        String fromAppId = "";
+        String transId = "";
+        String path = "";
+        String payload = "";
+        boolean xml = false;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.RestPut(fromAppId, transId, path, payload, xml);
+    }
+
+    @Test
+    public void testRestPost() throws Exception {
+        AAIRestInterface testSubject;
+        String fromAppId = "";
+        String transId = "";
+        String path = "";
+        String payload = "";
+        boolean xml = false;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.RestPost(fromAppId, transId, path, payload, xml);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/util/CustomJacksonJaxBJsonProviderTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/util/CustomJacksonJaxBJsonProviderTest.java
new file mode 100644
index 0000000..dcd962f
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/util/CustomJacksonJaxBJsonProviderTest.java
@@ -0,0 +1,19 @@
+package org.onap.vid.aai.util;
+
+import org.junit.Test;
+
+public class CustomJacksonJaxBJsonProviderTest {
+
+    private CustomJacksonJaxBJsonProvider createTestSubject() {
+        return new CustomJacksonJaxBJsonProvider();
+    }
+
+    @Test
+    public void testGetMapper() throws Exception {
+        CustomJacksonJaxBJsonProvider testSubject;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.getMapper();
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/util/HttpsAuthClientTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/util/HttpsAuthClientTest.java
new file mode 100644
index 0000000..88d53c0
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/util/HttpsAuthClientTest.java
@@ -0,0 +1,18 @@
+package org.onap.vid.aai.util;
+
+import org.junit.Test;
+
+public class HttpsAuthClientTest {
+
+    private HttpsAuthClient createTestSubject() {
+        return new HttpsAuthClient();
+    }
+
+    @Test
+    public void testGetClient() throws Exception {
+        String certFilePath = "";
+
+        // default test
+        HttpsAuthClient.getClient(certFilePath);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/ChangeManagementRequestTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/ChangeManagementRequestTest.java
new file mode 100644
index 0000000..fda4d65
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/ChangeManagementRequestTest.java
@@ -0,0 +1,74 @@
+package org.onap.vid.changeManagement;
+
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Test;
+
+public class ChangeManagementRequestTest {
+
+    private ChangeManagementRequest createTestSubject() {
+        return new ChangeManagementRequest();
+    }
+
+    @Test
+    public void testGetRequestDetails() throws Exception {
+        ChangeManagementRequest testSubject;
+        List<RequestDetails> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRequestDetails();
+    }
+
+    @Test
+    public void testSetRequestDetails() throws Exception {
+        ChangeManagementRequest testSubject;
+        List<RequestDetails> requestDetails = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRequestDetails(requestDetails);
+    }
+
+    @Test
+    public void testGetRequestType() throws Exception {
+        ChangeManagementRequest testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRequestType();
+    }
+
+    @Test
+    public void testSetRequestType() throws Exception {
+        ChangeManagementRequest testSubject;
+        String requestType = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRequestType(requestType);
+    }
+
+    @Test
+    public void testGetAdditionalProperties() throws Exception {
+        ChangeManagementRequest testSubject;
+        Map<String, Object> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAdditionalProperties();
+    }
+
+    @Test
+    public void testSetAdditionalProperty() throws Exception {
+        ChangeManagementRequest testSubject;
+        String name = "";
+        Object value = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAdditionalProperty(name, value);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/CloudConfigurationTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/CloudConfigurationTest.java
new file mode 100644
index 0000000..d4e65b8
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/CloudConfigurationTest.java
@@ -0,0 +1,73 @@
+package org.onap.vid.changeManagement;
+
+import java.util.Map;
+
+import org.junit.Test;
+
+public class CloudConfigurationTest {
+
+    private CloudConfiguration createTestSubject() {
+        return new CloudConfiguration();
+    }
+
+    @Test
+    public void testGetLcpCloudRegionId() throws Exception {
+        CloudConfiguration testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getLcpCloudRegionId();
+    }
+
+    @Test
+    public void testSetLcpCloudRegionId() throws Exception {
+        CloudConfiguration testSubject;
+        String lcpCloudRegionId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setLcpCloudRegionId(lcpCloudRegionId);
+    }
+
+    @Test
+    public void testGetTenantId() throws Exception {
+        CloudConfiguration testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getTenantId();
+    }
+
+    @Test
+    public void testSetTenantId() throws Exception {
+        CloudConfiguration testSubject;
+        String tenantId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setTenantId(tenantId);
+    }
+
+    @Test
+    public void testGetAdditionalProperties() throws Exception {
+        CloudConfiguration testSubject;
+        Map<String, Object> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAdditionalProperties();
+    }
+
+    @Test
+    public void testSetAdditionalProperty() throws Exception {
+        CloudConfiguration testSubject;
+        String name = "";
+        Object value = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAdditionalProperty(name, value);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/GetVnfWorkflowRelationRequestTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/GetVnfWorkflowRelationRequestTest.java
new file mode 100644
index 0000000..5b818a9
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/GetVnfWorkflowRelationRequestTest.java
@@ -0,0 +1,32 @@
+package org.onap.vid.changeManagement;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class GetVnfWorkflowRelationRequestTest {
+
+    private GetVnfWorkflowRelationRequest createTestSubject() {
+        return new GetVnfWorkflowRelationRequest();
+    }
+
+    @Test
+    public void testGetVnfDetails() throws Exception {
+        GetVnfWorkflowRelationRequest testSubject;
+        List<VnfDetails> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getVnfDetails();
+    }
+
+    @Test
+    public void testSetVnfDetails() throws Exception {
+        GetVnfWorkflowRelationRequest testSubject;
+        List<VnfDetails> vnfDetails = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setVnfDetails(vnfDetails);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/GetWorkflowsResponseTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/GetWorkflowsResponseTest.java
new file mode 100644
index 0000000..3a23bbf
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/GetWorkflowsResponseTest.java
@@ -0,0 +1,32 @@
+package org.onap.vid.changeManagement;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class GetWorkflowsResponseTest {
+
+    private GetWorkflowsResponse createTestSubject() {
+        return new GetWorkflowsResponse();
+    }
+
+    @Test
+    public void testGetWorkflows() throws Exception {
+        GetWorkflowsResponse testSubject;
+        List<String> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getWorkflows();
+    }
+
+    @Test
+    public void testSetWorkflows() throws Exception {
+        GetWorkflowsResponse testSubject;
+        List<String> workflows = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setWorkflows(workflows);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/ModelInfoOfRelatedInstanceTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/ModelInfoOfRelatedInstanceTest.java
new file mode 100644
index 0000000..c11e96f
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/ModelInfoOfRelatedInstanceTest.java
@@ -0,0 +1,173 @@
+package org.onap.vid.changeManagement;
+
+import java.util.Map;
+
+import org.junit.Test;
+
+public class ModelInfoOfRelatedInstanceTest {
+
+    private ModelInfoOfRelatedInstance createTestSubject() {
+        return new ModelInfoOfRelatedInstance();
+    }
+
+    @Test
+    public void testGetModelType() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelType();
+    }
+
+    @Test
+    public void testSetModelType() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String modelType = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelType(modelType);
+    }
+
+    @Test
+    public void testGetModelInvariantId() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelInvariantId();
+    }
+
+    @Test
+    public void testSetModelInvariantId() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String modelInvariantId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelInvariantId(modelInvariantId);
+    }
+
+    @Test
+    public void testGetModelVersionId() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelVersionId();
+    }
+
+    @Test
+    public void testSetModelVersionId() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String modelVersionId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelVersionId(modelVersionId);
+    }
+
+    @Test
+    public void testGetModelName() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelName();
+    }
+
+    @Test
+    public void testSetModelName() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String modelName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelName(modelName);
+    }
+
+    @Test
+    public void testGetModelVersion() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelVersion();
+    }
+
+    @Test
+    public void testSetModelVersion() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String modelVersion = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelVersion(modelVersion);
+    }
+
+    @Test
+    public void testGetModelCustomizationName() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelCustomizationName();
+    }
+
+    @Test
+    public void testSetModelCustomizationName() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String modelCustomizationName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelCustomizationName(modelCustomizationName);
+    }
+
+    @Test
+    public void testGetModelCustomizationId() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelCustomizationId();
+    }
+
+    @Test
+    public void testSetModelCustomizationId() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String modelCustomizationId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelCustomizationId(modelCustomizationId);
+    }
+
+    @Test
+    public void testGetAdditionalProperties() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        Map<String, Object> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAdditionalProperties();
+    }
+
+    @Test
+    public void testSetAdditionalProperty() throws Exception {
+        ModelInfoOfRelatedInstance testSubject;
+        String name = "";
+        Object value = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAdditionalProperty(name, value);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/ModelInfoTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/ModelInfoTest.java
new file mode 100644
index 0000000..e573cc5
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/ModelInfoTest.java
@@ -0,0 +1,173 @@
+package org.onap.vid.changeManagement;
+
+import java.util.Map;
+
+import org.junit.Test;
+
+public class ModelInfoTest {
+
+    private ModelInfo createTestSubject() {
+        return new ModelInfo();
+    }
+
+    @Test
+    public void testGetModelType() throws Exception {
+        ModelInfo testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelType();
+    }
+
+    @Test
+    public void testSetModelType() throws Exception {
+        ModelInfo testSubject;
+        String modelType = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelType(modelType);
+    }
+
+    @Test
+    public void testGetModelInvariantId() throws Exception {
+        ModelInfo testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelInvariantId();
+    }
+
+    @Test
+    public void testSetModelInvariantId() throws Exception {
+        ModelInfo testSubject;
+        String modelInvariantId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelInvariantId(modelInvariantId);
+    }
+
+    @Test
+    public void testGetModelVersionId() throws Exception {
+        ModelInfo testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelVersionId();
+    }
+
+    @Test
+    public void testSetModelVersionId() throws Exception {
+        ModelInfo testSubject;
+        String modelVersionId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelVersionId(modelVersionId);
+    }
+
+    @Test
+    public void testGetModelName() throws Exception {
+        ModelInfo testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelName();
+    }
+
+    @Test
+    public void testSetModelName() throws Exception {
+        ModelInfo testSubject;
+        String modelName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelName(modelName);
+    }
+
+    @Test
+    public void testGetModelVersion() throws Exception {
+        ModelInfo testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelVersion();
+    }
+
+    @Test
+    public void testSetModelVersion() throws Exception {
+        ModelInfo testSubject;
+        String modelVersion = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelVersion(modelVersion);
+    }
+
+    @Test
+    public void testGetModelCustomizationName() throws Exception {
+        ModelInfo testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelCustomizationName();
+    }
+
+    @Test
+    public void testSetModelCustomizationName() throws Exception {
+        ModelInfo testSubject;
+        String modelCustomizationName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelCustomizationName(modelCustomizationName);
+    }
+
+    @Test
+    public void testGetModelCustomizationId() throws Exception {
+        ModelInfo testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelCustomizationId();
+    }
+
+    @Test
+    public void testSetModelCustomizationId() throws Exception {
+        ModelInfo testSubject;
+        String modelCustomizationId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelCustomizationId(modelCustomizationId);
+    }
+
+    @Test
+    public void testGetAdditionalProperties() throws Exception {
+        ModelInfo testSubject;
+        Map<String, Object> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAdditionalProperties();
+    }
+
+    @Test
+    public void testSetAdditionalProperty() throws Exception {
+        ModelInfo testSubject;
+        String name = "";
+        Object value = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAdditionalProperty(name, value);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/RequestDetailsTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/RequestDetailsTest.java
new file mode 100644
index 0000000..d06a12d
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/RequestDetailsTest.java
@@ -0,0 +1,72 @@
+package org.onap.vid.changeManagement;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class RequestDetailsTest {
+
+    private RequestDetails createTestSubject() {
+        return new RequestDetails();
+    }
+
+    @Test
+    public void testGetVnfName() throws Exception {
+        RequestDetails testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getVnfName();
+    }
+
+    @Test
+    public void testSetVnfName() throws Exception {
+        RequestDetails testSubject;
+        String vnfName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setVnfName(vnfName);
+    }
+
+    @Test
+    public void testGetVnfInstanceId() throws Exception {
+        RequestDetails testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getVnfInstanceId();
+    }
+
+    @Test
+    public void testSetVnfInstanceId() throws Exception {
+        RequestDetails testSubject;
+        String vnfInstanceId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setVnfInstanceId(vnfInstanceId);
+    }
+
+    @Test
+    public void testGetRelatedInstList() throws Exception {
+        RequestDetails testSubject;
+        List<RelatedInstanceList> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRelatedInstList();
+    }
+
+    @Test
+    public void testSetRelatedInstList() throws Exception {
+        RequestDetails testSubject;
+        List<RelatedInstanceList> relatedInstList = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRelatedInstList(relatedInstList);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/RequestInfoTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/RequestInfoTest.java
new file mode 100644
index 0000000..2d8ea3f
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/RequestInfoTest.java
@@ -0,0 +1,93 @@
+package org.onap.vid.changeManagement;
+
+import java.util.Map;
+
+import org.junit.Test;
+
+public class RequestInfoTest {
+
+    private RequestInfo createTestSubject() {
+        return new RequestInfo();
+    }
+
+    @Test
+    public void testGetSource() throws Exception {
+        RequestInfo testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getSource();
+    }
+
+    @Test
+    public void testSetSource() throws Exception {
+        RequestInfo testSubject;
+        String source = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setSource(source);
+    }
+
+    @Test
+    public void testGetSuppressRollback() throws Exception {
+        RequestInfo testSubject;
+        Boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getSuppressRollback();
+    }
+
+    @Test
+    public void testSetSuppressRollback() throws Exception {
+        RequestInfo testSubject;
+        Boolean suppressRollback = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setSuppressRollback(suppressRollback);
+    }
+
+    @Test
+    public void testGetRequestorId() throws Exception {
+        RequestInfo testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRequestorId();
+    }
+
+    @Test
+    public void testSetRequestorId() throws Exception {
+        RequestInfo testSubject;
+        String requestorId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRequestorId(requestorId);
+    }
+
+    @Test
+    public void testGetAdditionalProperties() throws Exception {
+        RequestInfo testSubject;
+        Map<String, Object> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAdditionalProperties();
+    }
+
+    @Test
+    public void testSetAdditionalProperty() throws Exception {
+        RequestInfo testSubject;
+        String name = "";
+        Object value = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAdditionalProperty(name, value);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/VnfDetailsTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/VnfDetailsTest.java
new file mode 100644
index 0000000..046a1f4
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/VnfDetailsTest.java
@@ -0,0 +1,84 @@
+package org.onap.vid.changeManagement;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class VnfDetailsTest {
+
+    private VnfDetails createTestSubject() {
+        return new VnfDetails();
+    }
+
+    @Test
+    public void testGetUUID() throws Exception {
+        VnfDetails testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getUUID();
+    }
+
+    @Test
+    public void testSetUUID() throws Exception {
+        VnfDetails testSubject;
+        String uUID = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setUUID(uUID);
+    }
+
+    @Test
+    public void testGetInvariantUUID() throws Exception {
+        VnfDetails testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getInvariantUUID();
+    }
+
+    @Test
+    public void testSetInvariantUUID() throws Exception {
+        VnfDetails testSubject;
+        String invariantUUID = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setInvariantUUID(invariantUUID);
+    }
+
+    @Test
+    public void testEquals() throws Exception {
+        VnfDetails testSubject;
+        Object o = null;
+        boolean result;
+
+        // test 1
+        testSubject = createTestSubject();
+        o = null;
+        result = testSubject.equals(o);
+        Assert.assertEquals(false, result);
+    }
+
+    @Test
+    public void testHashCode() throws Exception {
+        VnfDetails testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.hashCode();
+    }
+
+    @Test
+    public void testToString() throws Exception {
+        VnfDetails testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.toString();
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/VnfDetailsWithWorkflowsTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/VnfDetailsWithWorkflowsTest.java
new file mode 100644
index 0000000..970fd55
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/VnfDetailsWithWorkflowsTest.java
@@ -0,0 +1,32 @@
+package org.onap.vid.changeManagement;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class VnfDetailsWithWorkflowsTest {
+
+    private VnfDetailsWithWorkflows createTestSubject() {
+        return new VnfDetailsWithWorkflows();
+    }
+
+    @Test
+    public void testGetWorkflows() throws Exception {
+        VnfDetailsWithWorkflows testSubject;
+        List<String> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getWorkflows();
+    }
+
+    @Test
+    public void testSetWorkflows() throws Exception {
+        VnfDetailsWithWorkflows testSubject;
+        List<String> workflows = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setWorkflows(workflows);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/VnfWorkflowRelationAllResponseTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/VnfWorkflowRelationAllResponseTest.java
new file mode 100644
index 0000000..b8515d3
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/VnfWorkflowRelationAllResponseTest.java
@@ -0,0 +1,32 @@
+package org.onap.vid.changeManagement;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class VnfWorkflowRelationAllResponseTest {
+
+    private VnfWorkflowRelationAllResponse createTestSubject() {
+        return new VnfWorkflowRelationAllResponse();
+    }
+
+    @Test
+    public void testGetVnfs() throws Exception {
+        VnfWorkflowRelationAllResponse testSubject;
+        List<VnfDetailsWithWorkflows> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getVnfs();
+    }
+
+    @Test
+    public void testSetVnfs() throws Exception {
+        VnfWorkflowRelationAllResponse testSubject;
+        List<VnfDetailsWithWorkflows> vnfs = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setVnfs(vnfs);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/VnfWorkflowRelationRequestTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/VnfWorkflowRelationRequestTest.java
new file mode 100644
index 0000000..aa3e35f
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/VnfWorkflowRelationRequestTest.java
@@ -0,0 +1,32 @@
+package org.onap.vid.changeManagement;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class VnfWorkflowRelationRequestTest {
+
+    private VnfWorkflowRelationRequest createTestSubject() {
+        return new VnfWorkflowRelationRequest();
+    }
+
+    @Test
+    public void testGetWorkflowsDetails() throws Exception {
+        VnfWorkflowRelationRequest testSubject;
+        List<WorkflowsDetail> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getWorkflowsDetails();
+    }
+
+    @Test
+    public void testSetWorkflowsDetails() throws Exception {
+        VnfWorkflowRelationRequest testSubject;
+        List<WorkflowsDetail> workflowsDetails = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setWorkflowsDetails(workflowsDetails);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/WorkflowsDetailTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/WorkflowsDetailTest.java
new file mode 100644
index 0000000..2c218b8
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/WorkflowsDetailTest.java
@@ -0,0 +1,60 @@
+package org.onap.vid.changeManagement;
+
+import org.junit.Test;
+
+public class WorkflowsDetailTest {
+
+    private WorkflowsDetail createTestSubject() {
+        return new WorkflowsDetail();
+    }
+
+    @Test
+    public void testGetVnfDetails() throws Exception {
+        WorkflowsDetail testSubject;
+        VnfDetails result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getVnfDetails();
+    }
+
+    @Test
+    public void testSetVnfDetails() throws Exception {
+        WorkflowsDetail testSubject;
+        VnfDetails vnfDetails = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setVnfDetails(vnfDetails);
+    }
+
+    @Test
+    public void testGetWorkflowName() throws Exception {
+        WorkflowsDetail testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getWorkflowName();
+    }
+
+    @Test
+    public void testSetWorkflowName() throws Exception {
+        WorkflowsDetail testSubject;
+        String workflowName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setWorkflowName(workflowName);
+    }
+
+    @Test
+    public void testToString() throws Exception {
+        WorkflowsDetail testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.toString();
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/CategoryParameterOptionTest.java b/vid-app-common/src/test/java/org/onap/vid/model/CategoryParameterOptionTest.java
new file mode 100644
index 0000000..35ef0ff
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/model/CategoryParameterOptionTest.java
@@ -0,0 +1,189 @@
+package org.onap.vid.model;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class CategoryParameterOptionTest {
+
+    private CategoryParameterOption createTestSubject() {
+        return new CategoryParameterOption();
+    }
+
+    @Test
+    public void testGetId() throws Exception {
+        CategoryParameterOption testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getId();
+    }
+
+    @Test
+    public void testSetId() throws Exception {
+        CategoryParameterOption testSubject;
+        Long id = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setId(id);
+    }
+
+    @Test
+    public void testGetAppId() throws Exception {
+        CategoryParameterOption testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAppId();
+    }
+
+    @Test
+    public void testSetAppId() throws Exception {
+        CategoryParameterOption testSubject;
+        String appId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAppId(appId);
+    }
+
+    @Test
+    public void testGetName() throws Exception {
+        CategoryParameterOption testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getName();
+    }
+
+    @Test
+    public void testSetName() throws Exception {
+        CategoryParameterOption testSubject;
+        String name = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setName(name);
+    }
+
+    @Test
+    public void testGetCategoryParameter() throws Exception {
+        CategoryParameterOption testSubject;
+        CategoryParameter result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCategoryParameter();
+    }
+
+    @Test
+    public void testSetCategoryParameter() throws Exception {
+        CategoryParameterOption testSubject;
+        CategoryParameter categoryParameter = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setCategoryParameter(categoryParameter);
+    }
+
+    @Test
+    public void testGetCreated() throws Exception {
+        CategoryParameterOption testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreated();
+    }
+
+    @Test
+    public void testGetModified() throws Exception {
+        CategoryParameterOption testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModified();
+    }
+
+    @Test
+    public void testGetCreatedId() throws Exception {
+        CategoryParameterOption testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreatedId();
+    }
+
+    @Test
+    public void testGetModifiedId() throws Exception {
+        CategoryParameterOption testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModifiedId();
+    }
+
+    @Test
+    public void testGetAuditUserId() throws Exception {
+        CategoryParameterOption testSubject;
+        Serializable result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditUserId();
+    }
+
+    @Test
+    public void testGetRowNum() throws Exception {
+        CategoryParameterOption testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRowNum();
+    }
+
+    @Test
+    public void testGetAuditTrail() throws Exception {
+        CategoryParameterOption testSubject;
+        Set result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditTrail();
+    }
+
+    @Test
+    public void testEquals() throws Exception {
+        CategoryParameterOption testSubject;
+        Object o = null;
+        boolean result;
+
+        // test 1
+        testSubject = createTestSubject();
+        o = null;
+        result = testSubject.equals(o);
+        Assert.assertEquals(false, result);
+    }
+
+    @Test
+    public void testHashCode() throws Exception {
+        CategoryParameterOption testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.hashCode();
+    }
+
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/CategoryParameterTest.java b/vid-app-common/src/test/java/org/onap/vid/model/CategoryParameterTest.java
new file mode 100644
index 0000000..6966a40
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/model/CategoryParameterTest.java
@@ -0,0 +1,185 @@
+package org.onap.vid.model;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+import org.junit.Test;
+
+public class CategoryParameterTest {
+
+    private CategoryParameter createTestSubject() {
+        return new CategoryParameter();
+    }
+
+    @Test
+    public void testGetFamily() throws Exception {
+        CategoryParameter testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getFamily();
+    }
+
+    @Test
+    public void testSetFamily() throws Exception {
+        CategoryParameter testSubject;
+        String family = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setFamily(family);
+    }
+
+    @Test
+    public void testGetId() throws Exception {
+        CategoryParameter testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getId();
+    }
+
+    @Test
+    public void testGetCreated() throws Exception {
+        CategoryParameter testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreated();
+    }
+
+    @Test
+    public void testGetModified() throws Exception {
+        CategoryParameter testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModified();
+    }
+
+    @Test
+    public void testGetCreatedId() throws Exception {
+        CategoryParameter testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreatedId();
+    }
+
+    @Test
+    public void testGetModifiedId() throws Exception {
+        CategoryParameter testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModifiedId();
+    }
+
+    @Test
+    public void testGetName() throws Exception {
+        CategoryParameter testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getName();
+    }
+
+    @Test
+    public void testSetName() throws Exception {
+        CategoryParameter testSubject;
+        String name = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setName(name);
+    }
+
+    @Test
+    public void testGetAuditUserId() throws Exception {
+        CategoryParameter testSubject;
+        Serializable result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditUserId();
+    }
+
+    @Test
+    public void testGetRowNum() throws Exception {
+        CategoryParameter testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRowNum();
+    }
+
+    @Test
+    public void testGetAuditTrail() throws Exception {
+        CategoryParameter testSubject;
+        Set result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditTrail();
+    }
+
+    @Test
+    public void testGetOptions() throws Exception {
+        CategoryParameter testSubject;
+        Set<CategoryParameterOption> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOptions();
+    }
+
+    @Test
+    public void testSetOptions() throws Exception {
+        CategoryParameter testSubject;
+        Set<CategoryParameterOption> options = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOptions(options);
+    }
+
+    @Test
+    public void testAddOption() throws Exception {
+        CategoryParameter testSubject;
+        CategoryParameterOption option = null;
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.addOption(option);
+    }
+
+    @Test
+    public void testIsIdSupported() throws Exception {
+        CategoryParameter testSubject;
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.isIdSupported();
+    }
+
+    @Test
+    public void testSetIdSupported() throws Exception {
+        CategoryParameter testSubject;
+        boolean idSupported = false;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setIdSupported(idSupported);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/ExceptionResponseTest.java b/vid-app-common/src/test/java/org/onap/vid/model/ExceptionResponseTest.java
new file mode 100644
index 0000000..6d1a7ad
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/model/ExceptionResponseTest.java
@@ -0,0 +1,50 @@
+package org.onap.vid.model;
+
+import org.junit.Test;
+
+public class ExceptionResponseTest {
+
+    private ExceptionResponse createTestSubject() {
+        return new ExceptionResponse();
+    }
+
+    @Test
+    public void testGetException() throws Exception {
+        ExceptionResponse testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getException();
+    }
+
+    @Test
+    public void testSetException() throws Exception {
+        ExceptionResponse testSubject;
+        String exception = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setException(exception);
+    }
+
+    @Test
+    public void testGetMessage() throws Exception {
+        ExceptionResponse testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getMessage();
+    }
+
+    @Test
+    public void testSetMessage() throws Exception {
+        ExceptionResponse testSubject;
+        String message = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setMessage(message);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/ListOfErrorsResponseTest.java b/vid-app-common/src/test/java/org/onap/vid/model/ListOfErrorsResponseTest.java
new file mode 100644
index 0000000..0907195
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/model/ListOfErrorsResponseTest.java
@@ -0,0 +1,32 @@
+package org.onap.vid.model;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class ListOfErrorsResponseTest {
+
+    private ListOfErrorsResponse createTestSubject() {
+        return new ListOfErrorsResponse();
+    }
+
+    @Test
+    public void testGetErrors() throws Exception {
+        ListOfErrorsResponse testSubject;
+        List<String> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getErrors();
+    }
+
+    @Test
+    public void testSetErrors() throws Exception {
+        ListOfErrorsResponse testSubject;
+        List<String> errors = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setErrors(errors);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/NewNetworkTest.java b/vid-app-common/src/test/java/org/onap/vid/model/NewNetworkTest.java
new file mode 100644
index 0000000..e0fa86b
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/model/NewNetworkTest.java
@@ -0,0 +1,30 @@
+package org.onap.vid.model;
+
+import org.junit.Test;
+
+public class NewNetworkTest {
+
+    private NewNetwork createTestSubject() {
+        return new NewNetwork();
+    }
+
+    @Test
+    public void testGetModelCustomizationName() throws Exception {
+        NewNetwork testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModelCustomizationName();
+    }
+
+    @Test
+    public void testSetModelCustomizationName() throws Exception {
+        NewNetwork testSubject;
+        String modelCustomizationName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setModelCustomizationName(modelCustomizationName);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/RequestReferencesContainerTest.java b/vid-app-common/src/test/java/org/onap/vid/model/RequestReferencesContainerTest.java
new file mode 100644
index 0000000..4587f4e
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/model/RequestReferencesContainerTest.java
@@ -0,0 +1,54 @@
+package org.onap.vid.model;
+
+import java.util.Map;
+
+import org.junit.Test;
+import org.onap.vid.domain.mso.RequestReferences;
+
+public class RequestReferencesContainerTest {
+
+    private RequestReferencesContainer createTestSubject() {
+        return new RequestReferencesContainer(new RequestReferences());
+    }
+
+    @Test
+    public void testGetAdditionalProperties() throws Exception {
+        RequestReferencesContainer testSubject;
+        Map<String, Object> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAdditionalProperties();
+    }
+
+    @Test
+    public void testSetAdditionalProperty() throws Exception {
+        RequestReferencesContainer testSubject;
+        String name = "";
+        Object value = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAdditionalProperty(name, value);
+    }
+
+    @Test
+    public void testGetRequestReferences() throws Exception {
+        RequestReferencesContainer testSubject;
+        RequestReferences result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRequestReferences();
+    }
+
+    @Test
+    public void testToString() throws Exception {
+        RequestReferencesContainer testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.toString();
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/ResultTest.java b/vid-app-common/src/test/java/org/onap/vid/model/ResultTest.java
new file mode 100644
index 0000000..ea7448b
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/model/ResultTest.java
@@ -0,0 +1,30 @@
+package org.onap.vid.model;
+
+import org.junit.Test;
+
+public class ResultTest {
+
+    private Result createTestSubject() {
+        return new Result("");
+    }
+
+    @Test
+    public void testGetResult() throws Exception {
+        Result testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getResult();
+    }
+
+    @Test
+    public void testSetResult() throws Exception {
+        Result testSubject;
+        String result = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setResult(result);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/ServiceInstanceSearchResultTest.java b/vid-app-common/src/test/java/org/onap/vid/model/ServiceInstanceSearchResultTest.java
new file mode 100644
index 0000000..e823537
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/model/ServiceInstanceSearchResultTest.java
@@ -0,0 +1,182 @@
+package org.onap.vid.model;
+
+import org.junit.Test;
+
+public class ServiceInstanceSearchResultTest {
+
+    private ServiceInstanceSearchResult createTestSubject() {
+        return new ServiceInstanceSearchResult();
+    }
+
+    @Test
+    public void testGetServiceInstanceId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getServiceInstanceId();
+    }
+
+    @Test
+    public void testSetServiceInstanceId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String serviceInstanceId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setServiceInstanceId(serviceInstanceId);
+    }
+
+    @Test
+    public void testGetGlobalCustomerId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getGlobalCustomerId();
+    }
+
+    @Test
+    public void testSetGlobalCustomerId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String globalCustomerId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setGlobalCustomerId(globalCustomerId);
+    }
+
+    @Test
+    public void testGetServiceType() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getServiceType();
+    }
+
+    @Test
+    public void testSetServiceType() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String serviceType = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setServiceType(serviceType);
+    }
+
+    @Test
+    public void testGetServiceInstanceName() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getServiceInstanceName();
+    }
+
+    @Test
+    public void testSetServiceInstanceName() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String serviceInstanceName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setServiceInstanceName(serviceInstanceName);
+    }
+
+    @Test
+    public void testGetSubscriberName() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getSubscriberName();
+    }
+
+    @Test
+    public void testSetSubscriberName() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String subscriberName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setSubscriberName(subscriberName);
+    }
+
+    @Test
+    public void testGetAaiModelInvariantId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAaiModelInvariantId();
+    }
+
+    @Test
+    public void testSetAaiModelInvariantId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String aaiModelInvariantId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAaiModelInvariantId(aaiModelInvariantId);
+    }
+
+    @Test
+    public void testGetAaiModelVersionId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAaiModelVersionId();
+    }
+
+    @Test
+    public void testSetAaiModelVersionId() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        String aaiModelVersionId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAaiModelVersionId(aaiModelVersionId);
+    }
+
+    @Test
+    public void testGetIsPermitted() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getIsPermitted();
+    }
+
+    @Test
+    public void testSetIsPermitted() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        boolean isPermitted = false;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setIsPermitted(isPermitted);
+    }
+
+    @Test
+    public void testEquals() throws Exception {
+        ServiceInstanceSearchResult testSubject;
+        Object other = null;
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.equals(other);
+    }
+
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/VNFDaoTest.java b/vid-app-common/src/test/java/org/onap/vid/model/VNFDaoTest.java
new file mode 100644
index 0000000..41447d3
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/model/VNFDaoTest.java
@@ -0,0 +1,154 @@
+package org.onap.vid.model;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+import org.junit.Test;
+
+public class VNFDaoTest {
+
+    private VNFDao createTestSubject() {
+        return new VNFDao();
+    }
+
+    @Test
+    public void testGetId() throws Exception {
+        VNFDao testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getId();
+    }
+
+    @Test
+    public void testGetCreated() throws Exception {
+        VNFDao testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreated();
+    }
+
+    @Test
+    public void testGetModified() throws Exception {
+        VNFDao testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModified();
+    }
+
+    @Test
+    public void testGetCreatedId() throws Exception {
+        VNFDao testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreatedId();
+    }
+
+    @Test
+    public void testGetModifiedId() throws Exception {
+        VNFDao testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModifiedId();
+    }
+
+    @Test
+    public void testGetAuditUserId() throws Exception {
+        VNFDao testSubject;
+        Serializable result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditUserId();
+    }
+
+    @Test
+    public void testGetRowNum() throws Exception {
+        VNFDao testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRowNum();
+    }
+
+    @Test
+    public void testGetAuditTrail() throws Exception {
+        VNFDao testSubject;
+        Set result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditTrail();
+    }
+
+    @Test
+    public void testGetVnfUUID() throws Exception {
+        VNFDao testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getVnfUUID();
+    }
+
+    @Test
+    public void testGetVnfInvariantUUID() throws Exception {
+        VNFDao testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getVnfInvariantUUID();
+    }
+
+    @Test
+    public void testSetVnfUUID() throws Exception {
+        VNFDao testSubject;
+        String vnfUUID = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setVnfUUID(vnfUUID);
+    }
+
+    @Test
+    public void testSetVnfInvariantUUID() throws Exception {
+        VNFDao testSubject;
+        String vnfInvariantUUID = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setVnfInvariantUUID(vnfInvariantUUID);
+    }
+
+    @Test
+    public void testGetWorkflows() throws Exception {
+        VNFDao testSubject;
+        Set<VidWorkflow> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getWorkflows();
+    }
+
+    @Test
+    public void testSetWorkflows() throws Exception {
+        VNFDao testSubject;
+        Set<VidWorkflow> workflows = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setWorkflows(workflows);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/VNFTest.java b/vid-app-common/src/test/java/org/onap/vid/model/VNFTest.java
new file mode 100644
index 0000000..cc8a3b8
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/model/VNFTest.java
@@ -0,0 +1,19 @@
+package org.onap.vid.model;
+
+import org.junit.Test;
+
+public class VNFTest {
+
+    private VNF createTestSubject() {
+        return new VNF();
+    }
+
+    @Test
+    public void testNormalizeName() throws Exception {
+        String originalName = "test";
+        String result;
+
+        // default test
+        result = VNF.normalizeName(originalName);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/VidWorkflowTest.java b/vid-app-common/src/test/java/org/onap/vid/model/VidWorkflowTest.java
new file mode 100644
index 0000000..2909755
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/model/VidWorkflowTest.java
@@ -0,0 +1,114 @@
+package org.onap.vid.model;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+import org.junit.Test;
+
+public class VidWorkflowTest {
+
+    private VidWorkflow createTestSubject() {
+        return new VidWorkflow();
+    }
+
+    @Test
+    public void testGetId() throws Exception {
+        VidWorkflow testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getId();
+    }
+
+    @Test
+    public void testGetCreated() throws Exception {
+        VidWorkflow testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreated();
+    }
+
+    @Test
+    public void testGetModified() throws Exception {
+        VidWorkflow testSubject;
+        Date result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModified();
+    }
+
+    @Test
+    public void testGetCreatedId() throws Exception {
+        VidWorkflow testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getCreatedId();
+    }
+
+    @Test
+    public void testGetModifiedId() throws Exception {
+        VidWorkflow testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getModifiedId();
+    }
+
+    @Test
+    public void testGetAuditUserId() throws Exception {
+        VidWorkflow testSubject;
+        Serializable result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditUserId();
+    }
+
+    @Test
+    public void testGetRowNum() throws Exception {
+        VidWorkflow testSubject;
+        Long result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRowNum();
+    }
+
+    @Test
+    public void testGetAuditTrail() throws Exception {
+        VidWorkflow testSubject;
+        Set result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAuditTrail();
+    }
+
+    @Test
+    public void testGetWokflowName() throws Exception {
+        VidWorkflow testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getWokflowName();
+    }
+
+    @Test
+    public void testSetWokflowName() throws Exception {
+        VidWorkflow testSubject;
+        String wokflowName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setWokflowName(wokflowName);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/MsoResponseWrapper2Test.java b/vid-app-common/src/test/java/org/onap/vid/mso/MsoResponseWrapper2Test.java
new file mode 100644
index 0000000..27981bb
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/MsoResponseWrapper2Test.java
@@ -0,0 +1,40 @@
+package org.onap.vid.mso;
+
+import org.junit.Test;
+
+public class MsoResponseWrapper2Test {
+
+    private MsoResponseWrapper2 createTestSubject() {
+        return new MsoResponseWrapper2(new RestObject());
+    }
+
+    @Test
+    public void testGetStatus() throws Exception {
+        MsoResponseWrapper2 testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getStatus();
+    }
+
+    @Test
+    public void testGetResponse() throws Exception {
+        MsoResponseWrapper2 testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getResponse();
+    }
+
+    @Test
+    public void testGetEntity() throws Exception {
+        MsoResponseWrapper2 testSubject;
+        Object result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getEntity();
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/MsoResponseWrapperTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/MsoResponseWrapperTest.java
new file mode 100644
index 0000000..b5b0d9f
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/MsoResponseWrapperTest.java
@@ -0,0 +1,70 @@
+package org.onap.vid.mso;
+
+import org.junit.Test;
+
+public class MsoResponseWrapperTest {
+
+    private MsoResponseWrapper createTestSubject() {
+        return new MsoResponseWrapper();
+    }
+
+    @Test
+    public void testGetEntity() throws Exception {
+        MsoResponseWrapper testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getEntity();
+    }
+
+    @Test
+    public void testGetStatus() throws Exception {
+        MsoResponseWrapper testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getStatus();
+    }
+
+    @Test
+    public void testSetStatus() throws Exception {
+        MsoResponseWrapper testSubject;
+        int v = 0;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setStatus(v);
+    }
+
+    @Test
+    public void testSetEntity() throws Exception {
+        MsoResponseWrapper testSubject;
+        String v = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setEntity(v);
+    }
+
+    @Test
+    public void testToString() throws Exception {
+        MsoResponseWrapper testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.toString();
+    }
+
+    @Test
+    public void testGetResponse() throws Exception {
+        MsoResponseWrapper testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getResponse();
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/RestObjectTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/RestObjectTest.java
new file mode 100644
index 0000000..38ccf6c
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/RestObjectTest.java
@@ -0,0 +1,80 @@
+package org.onap.vid.mso;
+
+import org.apache.poi.hssf.record.formula.functions.T;
+import org.junit.Test;
+
+public class RestObjectTest {
+
+    private RestObject createTestSubject() {
+        return new RestObject();
+    }
+
+    @Test
+    public void testSet() throws Exception {
+        RestObject testSubject;
+        T t = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.set(t);
+    }
+
+    @Test
+    public void testGet() throws Exception {
+        RestObject testSubject;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.get();
+    }
+
+    @Test
+    public void testSetStatusCode() throws Exception {
+        RestObject testSubject;
+        int v = 0;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setStatusCode(v);
+    }
+
+    @Test
+    public void testGetStatusCode() throws Exception {
+        RestObject testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getStatusCode();
+    }
+
+    @Test
+    public void testGetRaw() throws Exception {
+        RestObject testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRaw();
+    }
+
+    @Test
+    public void testSetRaw() throws Exception {
+        RestObject testSubject;
+        String rawT = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRaw(rawT);
+    }
+
+    @Test
+    public void testToString() throws Exception {
+        RestObject testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.toString();
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestListTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestListTest.java
new file mode 100644
index 0000000..d51ba2b
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestListTest.java
@@ -0,0 +1,85 @@
+package org.onap.vid.mso.rest;
+
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Test;
+
+public class RequestListTest {
+
+    private RequestList createTestSubject() {
+        return new RequestList();
+    }
+
+    @Test
+    public void testGetRequestList() throws Exception {
+        RequestList testSubject;
+        List<RequestWrapper> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRequestList();
+    }
+
+    @Test
+    public void testSetRequestList() throws Exception {
+        RequestList testSubject;
+        List<RequestWrapper> l = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRequestList(l);
+    }
+
+    @Test
+    public void testToString() throws Exception {
+        RequestList testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.toString();
+    }
+
+    @Test
+    public void testGetAdditionalProperties() throws Exception {
+        RequestList testSubject;
+        Map<String, Object> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAdditionalProperties();
+    }
+
+    @Test
+    public void testSetAdditionalProperty() throws Exception {
+        RequestList testSubject;
+        String name = "";
+        Object value = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setAdditionalProperty(name, value);
+    }
+
+    @Test
+    public void testHashCode() throws Exception {
+        RequestList testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.hashCode();
+    }
+
+    @Test
+    public void testEquals() throws Exception {
+        RequestList testSubject;
+        Object other = null;
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.equals(other);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestTest.java
new file mode 100644
index 0000000..f07fd1a
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestTest.java
@@ -0,0 +1,103 @@
+package org.onap.vid.mso.rest;
+
+import org.junit.Test;
+import org.onap.vid.domain.mso.InstanceIds;
+import org.onap.vid.domain.mso.RequestStatus;
+
+public class RequestTest {
+
+    private Request createTestSubject() {
+        return new Request();
+    }
+
+    @Test
+    public void testGetInstanceIds() throws Exception {
+        Request testSubject;
+        InstanceIds result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getInstanceIds();
+    }
+
+    @Test
+    public void testSetInstanceIds() throws Exception {
+        Request testSubject;
+        InstanceIds instanceIds = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setInstanceIds(instanceIds);
+    }
+
+    @Test
+    public void testGetRequestDetails() throws Exception {
+        Request testSubject;
+        RequestDetails result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRequestDetails();
+    }
+
+    @Test
+    public void testSetRequestDetails() throws Exception {
+        Request testSubject;
+        RequestDetails requestDetails = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRequestDetails(requestDetails);
+    }
+
+    @Test
+    public void testGetRequestStatus() throws Exception {
+        Request testSubject;
+        RequestStatus result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRequestStatus();
+    }
+
+    @Test
+    public void testSetRequestStatus() throws Exception {
+        Request testSubject;
+        RequestStatus requestStatus = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRequestStatus(requestStatus);
+    }
+
+    @Test
+    public void testToString() throws Exception {
+        Request testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.toString();
+    }
+
+    @Test
+    public void testEquals() throws Exception {
+        Request testSubject;
+        Object other = null;
+        boolean result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.equals(other);
+    }
+
+    @Test
+    public void testHashCode() throws Exception {
+        Request testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.hashCode();
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestWrapperTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestWrapperTest.java
new file mode 100644
index 0000000..6fe3370
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestWrapperTest.java
@@ -0,0 +1,30 @@
+package org.onap.vid.mso.rest;
+
+import org.junit.Test;
+
+public class RequestWrapperTest {
+
+    private RequestWrapper createTestSubject() {
+        return new RequestWrapper();
+    }
+
+    @Test
+    public void testGetRequest() throws Exception {
+        RequestWrapper testSubject;
+        Request result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getRequest();
+    }
+
+    @Test
+    public void testSetRequest() throws Exception {
+        RequestWrapper testSubject;
+        Request request = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setRequest(request);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/ResponseTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/ResponseTest.java
new file mode 100644
index 0000000..56ec6a4
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/ResponseTest.java
@@ -0,0 +1,50 @@
+package org.onap.vid.mso.rest;
+
+import org.junit.Test;
+
+public class ResponseTest {
+
+    private Response createTestSubject() {
+        return new Response();
+    }
+
+    @Test
+    public void testGetStatus() throws Exception {
+        Response testSubject;
+        int result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getStatus();
+    }
+
+    @Test
+    public void testSetStatus() throws Exception {
+        Response testSubject;
+        int status = 0;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setStatus(status);
+    }
+
+    @Test
+    public void testGetEntity() throws Exception {
+        Response testSubject;
+        RequestList result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getEntity();
+    }
+
+    @Test
+    public void testSetEntity() throws Exception {
+        Response testSubject;
+        RequestList entity = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setEntity(entity);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/TaskListTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/TaskListTest.java
new file mode 100644
index 0000000..9c35228
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/TaskListTest.java
@@ -0,0 +1,32 @@
+package org.onap.vid.mso.rest;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class TaskListTest {
+
+    private TaskList createTestSubject() {
+        return new TaskList();
+    }
+
+    @Test
+    public void testGetTaskList() throws Exception {
+        TaskList testSubject;
+        List<Task> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getTaskList();
+    }
+
+    @Test
+    public void testSetTaskList() throws Exception {
+        TaskList testSubject;
+        List<Task> taskList = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setTaskList(taskList);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/TaskTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/TaskTest.java
new file mode 100644
index 0000000..ae115a3
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/TaskTest.java
@@ -0,0 +1,252 @@
+package org.onap.vid.mso.rest;
+
+import java.util.List;
+
+import org.junit.Test;
+
+public class TaskTest {
+
+    private Task createTestSubject() {
+        return new Task();
+    }
+
+    @Test
+    public void testGetTaskId() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getTaskId();
+    }
+
+    @Test
+    public void testSetTaskId() throws Exception {
+        Task testSubject;
+        String taskId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setTaskId(taskId);
+    }
+
+    @Test
+    public void testGetType() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getType();
+    }
+
+    @Test
+    public void testSetType() throws Exception {
+        Task testSubject;
+        String type = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setType(type);
+    }
+
+    @Test
+    public void testGetNfRole() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getNfRole();
+    }
+
+    @Test
+    public void testSetNfRole() throws Exception {
+        Task testSubject;
+        String nfRole = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setNfRole(nfRole);
+    }
+
+    @Test
+    public void testGetSubscriptionServiceType() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getSubscriptionServiceType();
+    }
+
+    @Test
+    public void testSetSubscriptionServiceType() throws Exception {
+        Task testSubject;
+        String subscriptionServiceType = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setSubscriptionServiceType(subscriptionServiceType);
+    }
+
+    @Test
+    public void testGetOriginalRequestId() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOriginalRequestId();
+    }
+
+    @Test
+    public void testSetOriginalRequestId() throws Exception {
+        Task testSubject;
+        String originalRequestId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOriginalRequestId(originalRequestId);
+    }
+
+    @Test
+    public void testGetOriginalRequestorId() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getOriginalRequestorId();
+    }
+
+    @Test
+    public void testSetOriginalRequestorId() throws Exception {
+        Task testSubject;
+        String originalRequestorId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setOriginalRequestorId(originalRequestorId);
+    }
+
+    @Test
+    public void testGetErrorSource() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getErrorSource();
+    }
+
+    @Test
+    public void testSetErrorSource() throws Exception {
+        Task testSubject;
+        String errorSource = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setErrorSource(errorSource);
+    }
+
+    @Test
+    public void testGetErrorCode() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getErrorCode();
+    }
+
+    @Test
+    public void testSetErrorCode() throws Exception {
+        Task testSubject;
+        String errorCode = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setErrorCode(errorCode);
+    }
+
+    @Test
+    public void testGetErrorMessage() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getErrorMessage();
+    }
+
+    @Test
+    public void testSetErrorMessage() throws Exception {
+        Task testSubject;
+        String errorMessage = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setErrorMessage(errorMessage);
+    }
+
+    @Test
+    public void testGetBuildingBlockName() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getBuildingBlockName();
+    }
+
+    @Test
+    public void testSetBuildingBlockName() throws Exception {
+        Task testSubject;
+        String buildingBlockName = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setBuildingBlockName(buildingBlockName);
+    }
+
+    @Test
+    public void testGetBuildingBlockStep() throws Exception {
+        Task testSubject;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getBuildingBlockStep();
+    }
+
+    @Test
+    public void testSetBuildingBlockStep() throws Exception {
+        Task testSubject;
+        String buildingBlockStep = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setBuildingBlockStep(buildingBlockStep);
+    }
+
+    @Test
+    public void testGetValidResponses() throws Exception {
+        Task testSubject;
+        List<String> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getValidResponses();
+    }
+
+    @Test
+    public void testSetValidResponses() throws Exception {
+        Task testSubject;
+        List<String> validResponses = null;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.setValidResponses(validResponses);
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/policy/PolicyRestInterfaceFactoryTest.java b/vid-app-common/src/test/java/org/onap/vid/policy/PolicyRestInterfaceFactoryTest.java
new file mode 100644
index 0000000..bb21c89
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/policy/PolicyRestInterfaceFactoryTest.java
@@ -0,0 +1,18 @@
+package org.onap.vid.policy;
+
+import org.junit.Test;
+
+public class PolicyRestInterfaceFactoryTest {
+
+    private PolicyRestInterfaceFactory createTestSubject() {
+        return new PolicyRestInterfaceFactory();
+    }
+
+    @Test
+    public void testGetInstance() throws Exception {
+        PolicyRestInterfaceIfc result;
+
+        // default test
+        result = PolicyRestInterfaceFactory.getInstance();
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/policy/PolicyRestInterfaceTest.java b/vid-app-common/src/test/java/org/onap/vid/policy/PolicyRestInterfaceTest.java
index 04f6890..0e74c7d 100644
--- a/vid-app-common/src/test/java/org/onap/vid/policy/PolicyRestInterfaceTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/policy/PolicyRestInterfaceTest.java
@@ -7,18 +7,27 @@
 
 public class PolicyRestInterfaceTest {
 
-	private PolicyRestInterface createTestSubject() {
-		return new PolicyRestInterface();
-	}
+    private PolicyRestInterface createTestSubject() {
+        return new PolicyRestInterface();
+    }
 
+    @Test
+    public void testLogRequest() throws Exception {
+        PolicyRestInterface testSubject;
+        RequestDetails r = null;
 
-	@Test
-	public void testLogRequest() throws Exception {
-		PolicyRestInterface testSubject;
-		RequestDetails r = null;
+        // default test
+        testSubject = createTestSubject();
+        testSubject.logRequest(r);
+    }
 
-		// default test
-		testSubject = createTestSubject();
-		testSubject.logRequest(r);
-	}
+    /*@Test
+    public void testInitRestClient() throws Exception {
+        PolicyRestInterface testSubject;
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.initRestClient();
+    }*/
+
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/ChangeManagementServiceImplTest.java b/vid-app-common/src/test/java/org/onap/vid/services/ChangeManagementServiceImplTest.java
index e73838c..85b88a0 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/ChangeManagementServiceImplTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/ChangeManagementServiceImplTest.java
@@ -6,64 +6,111 @@
 import org.json.simple.JSONArray;
 import org.junit.Assert;
 import org.junit.Test;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.service.DataAccessServiceImpl;
 import org.onap.vid.changeManagement.ChangeManagementRequest;
+import org.onap.vid.changeManagement.GetVnfWorkflowRelationRequest;
 import org.onap.vid.changeManagement.RequestDetails;
+import org.onap.vid.changeManagement.VnfWorkflowRelationAllResponse;
+import org.onap.vid.changeManagement.VnfWorkflowRelationRequest;
+import org.onap.vid.changeManagement.VnfWorkflowRelationResponse;
+import org.onap.vid.mso.MsoBusinessLogic;
+import org.onap.vid.mso.MsoBusinessLogicImpl;
+import org.onap.vid.mso.rest.MsoRestClientNew;
 import org.onap.vid.mso.rest.Request;
 import org.springframework.http.ResponseEntity;
+import org.springframework.web.multipart.MultipartFile;
 
 public class ChangeManagementServiceImplTest {
 
-	/*TODO: fix private ChangeManagementServiceImpl createTestSubject() {
-		return new ChangeManagementServiceImpl();
-	}*/
+    private ChangeManagementServiceImpl createTestSubject() {
+        return new ChangeManagementServiceImpl(new DataAccessServiceImpl(), new MsoBusinessLogicImpl(new MsoRestClientNew()));
+    }
 
-	
-	/*@Test
-	public void testGetMSOChangeManagements() throws Exception {
-		ChangeManagementServiceImpl testSubject;
-		Collection<Request> result;
+    @Test
+    public void testGetMSOChangeManagements() throws Exception {
+        ChangeManagementServiceImpl testSubject;
+        Collection<Request> result;
 
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getMSOChangeManagements();
-	}
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getMSOChangeManagements();
+    }
 
-	
-	@Test
-	public void testFindRequestByVnfName() throws Exception {
-	ChangeManagementServiceImpl testSubject;List<RequestDetails> requests = null;
-	String vnfName = "";
-	RequestDetails result;
-	
-	// test 1
-	testSubject=createTestSubject();requests = null;
-	result=Deencapsulation.invoke(testSubject, "findRequestByVnfName", new Object[]{List<RequestDetails>.class, vnfName});
-	Assert.assertEquals(null, result);
-	}*/
-/*
-	
-	@Test
-	public void testDoChangeManagement() throws Exception {
-		ChangeManagementServiceImpl testSubject;
-		ChangeManagementRequest request = null;
-		String vnfName = "";
-		ResponseEntity<String> result;
+    @Test
+    public void testDoChangeManagement() throws Exception {
+        ChangeManagementServiceImpl testSubject;
+        ChangeManagementRequest request = null;
+        String vnfName = "";
+        ResponseEntity<String> result;
 
-		// test 1
-		testSubject = createTestSubject();
-		request = null;
-		result = testSubject.doChangeManagement(request, vnfName);
-		Assert.assertEquals(null, result);
-	}
+        // test 1
+        testSubject = createTestSubject();
+        request = null;
+        result = testSubject.doChangeManagement(request, vnfName);
+        Assert.assertEquals(null, result);
+    }
 
-	
-	@Test
-	public void testGetSchedulerChangeManagements() throws Exception {
-		ChangeManagementServiceImpl testSubject;
-		JSONArray result;
+    
+    @Test
+    public void testGetSchedulerChangeManagements() throws Exception {
+        ChangeManagementServiceImpl testSubject;
+        JSONArray result;
 
-		// default test
-		testSubject = createTestSubject();
-		result = testSubject.getSchedulerChangeManagements();
-	}*/
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getSchedulerChangeManagements();
+    }
+
+    @Test
+    public void testDeleteSchedule() throws Exception {
+        ChangeManagementServiceImpl testSubject;
+        String scheduleId = "";
+
+        // default test
+        testSubject = createTestSubject();
+        testSubject.deleteSchedule(scheduleId);
+    }
+
+
+
+    /*
+     * TODO: fix private ChangeManagementServiceImpl createTestSubject() {
+     * return new ChangeManagementServiceImpl(); }
+     */
+
+    /*
+     * @Test public void testGetMSOChangeManagements() throws Exception {
+     * ChangeManagementServiceImpl testSubject; Collection<Request> result;
+     * 
+     * // default test testSubject = createTestSubject(); result =
+     * testSubject.getMSOChangeManagements(); }
+     * 
+     * 
+     * @Test public void testFindRequestByVnfName() throws Exception {
+     * ChangeManagementServiceImpl testSubject;List<RequestDetails> requests =
+     * null; String vnfName = ""; RequestDetails result;
+     * 
+     * // test 1 testSubject=createTestSubject();requests = null;
+     * result=Deencapsulation.invoke(testSubject, "findRequestByVnfName", new
+     * Object[]{List<RequestDetails>.class, vnfName}); Assert.assertEquals(null,
+     * result); }
+     */
+    /*
+     * 
+     * @Test public void testDoChangeManagement() throws Exception {
+     * ChangeManagementServiceImpl testSubject; ChangeManagementRequest request
+     * = null; String vnfName = ""; ResponseEntity<String> result;
+     * 
+     * // test 1 testSubject = createTestSubject(); request = null; result =
+     * testSubject.doChangeManagement(request, vnfName);
+     * Assert.assertEquals(null, result); }
+     * 
+     * 
+     * @Test public void testGetSchedulerChangeManagements() throws Exception {
+     * ChangeManagementServiceImpl testSubject; JSONArray result;
+     * 
+     * // default test testSubject = createTestSubject(); result =
+     * testSubject.getSchedulerChangeManagements(); }
+     */
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/RoleGenaratorServiceImplTest.java b/vid-app-common/src/test/java/org/onap/vid/services/RoleGenaratorServiceImplTest.java
new file mode 100644
index 0000000..544a799
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/services/RoleGenaratorServiceImplTest.java
@@ -0,0 +1,26 @@
+package org.onap.vid.services;
+
+import static org.junit.Assert.*;
+import java.util.*;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class RoleGenaratorServiceImplTest {
+
+    private RoleGenaratorServiceImpl createTestSubject() {
+        return new RoleGenaratorServiceImpl();
+    }
+
+    @Test
+    public void testGenerateRoleScript() throws Exception {
+        RoleGenaratorServiceImpl testSubject;
+        Boolean firstRun = null;
+        String result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.generateRoleScript(firstRun);
+    }
+
+
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java b/vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java
new file mode 100644
index 0000000..36f8c0b
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/services/WorkflowServiceImplTest.java
@@ -0,0 +1,33 @@
+package org.onap.vid.services;
+
+import java.util.*;
+
+import org.junit.Test;
+
+public class WorkflowServiceImplTest {
+
+    private WorkflowServiceImpl createTestSubject() {
+        return new WorkflowServiceImpl();
+    }
+
+    @Test
+    public void testGetWorkflowsForVNFs() throws Exception {
+        WorkflowServiceImpl testSubject;
+        Collection<String> vnfNames = new ArrayList<String>();
+        Collection<String> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getWorkflowsForVNFs(vnfNames);
+    }
+
+    @Test
+    public void testGetAllWorkflows() throws Exception {
+        WorkflowServiceImpl testSubject;
+        Collection<String> result;
+
+        // default test
+        testSubject = createTestSubject();
+        result = testSubject.getAllWorkflows();
+    }
+}
\ No newline at end of file
