diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/AaiUtilTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/AaiUtilTest.groovy
index 914725c..8a5f9e9 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/AaiUtilTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/openecomp/mso/bpmn/common/scripts/AaiUtilTest.groovy
@@ -1,306 +1,305 @@
-/*- 
- * ============LICENSE_START======================================================= 
- * OPENECOMP - MSO 
- * ================================================================================ 
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. 
- * ================================================================================ 
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- * ============LICENSE_END========================================================= 
- */ 
-
-package org.openecomp.mso.bpmn.common.scripts;
-
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.*
-
-import org.openecomp.mso.rest.HttpHeader
-import org.mockito.MockitoAnnotations
-import org.mockito.runners.MockitoJUnitRunner
-import org.mockito.internal.debugging.MockitoDebuggerImpl
-import org.junit.Before
-import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
-import org.junit.Rule;
-import org.junit.Test
-import org.junit.Ignore
-import org.junit.runner.RunWith
-import org.junit.Before;
-import org.junit.Test;
-import org.camunda.bpm.engine.ProcessEngineServices
-import org.camunda.bpm.engine.RepositoryService
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl
-import org.camunda.bpm.engine.repository.ProcessDefinition
-
-@RunWith(MockitoJUnitRunner.class)
-class AaiUtilTest extends MsoGroovyTest {
-	
-	@Test
-	public void testGetVersionDefault() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def version = aaiUtil.getVersion(mockExecution, 'l3-network', 'CreateAAIVfModule')
-		assertEquals('8', version)
-	}
-	
-	@Test
-	public void testGetVersionResourceSpecific() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_l3_network_version")).thenReturn('7')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def version = aaiUtil.getVersion(mockExecution, 'l3-network', 'CreateAAIVfModule')
-		assertEquals('7', version)
-	}
-
-	@Test
-	public void testGetVersionFlowSpecific() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_custom_CreateAAIVfModule_aai_version")).thenReturn('6')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_l3_network_version")).thenReturn('7')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def version = aaiUtil.getVersion(mockExecution, 'l3-network', 'CreateAAIVfModule')
-		assertEquals('6', version)
-	}
-
-	@Test(expected=java.lang.Exception.class)
-	public void testGetVersionNotDefined() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def version = aaiUtil.getVersion(mockExecution, 'l3-network', 'CreateAAIVfModule')
-	}
-	
-	@Test
-	public void testGetUriDefaultVersion() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn('/aai/v8/network/l3-networks/l3-network')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-								
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getUri(mockExecution, 'l3-network')
-		assertEquals('/aai/v8/network/l3-networks/l3-network', uri)
-	}
-	
-	@Test
-	public void testGetUriFlowAndResourceSpecific() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_CreateAAIVfModule_aai_l3_network_uri")).thenReturn('/aai/v6/network/l3-networks/l3-network')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn('/aai/v8/network/l3-networks/l3-network')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-								
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getUri(mockExecution, 'l3-network')
-		assertEquals('/aai/v6/network/l3-networks/l3-network', uri)
-	}
-	
-	@Test
-	public void testGetNetworkGenericVnfEndpoint() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_generic_vnf_uri")).thenReturn('/aai/v8/network/generic-vnfs/generic-vnf')
-		when(mockExecution.getVariable('URN_aai_endpoint')).thenReturn('http://localhost:28090')
-		
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def endpoint = aaiUtil.getNetworkGenericVnfEndpoint(mockExecution)
-		assertEquals('http://localhost:28090/aai/v8/network/generic-vnfs/generic-vnf', endpoint)
-	}
-	
-	@Test
-	public void testGetNetworkGenericVnfUri() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_generic_vnf_uri")).thenReturn('/aai/v8/network/generic-vnfs/generic-vnf')
-				
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getNetworkGenericVnfUri(mockExecution)
-		assertEquals('/aai/v8/network/generic-vnfs/generic-vnf', uri)
-	}
-	
-	@Test
-	public void testGetNetworkVpnBindingUri() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vpn_binding_uri")).thenReturn('/aai/v8/network/vpn-bindings/vpn-binding')
-		
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getNetworkVpnBindingUri(mockExecution)
-		assertEquals('/aai/v8/network/vpn-bindings/vpn-binding', uri)
-	}
-
-	@Test
-	public void testGetNetworkPolicyUri() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_network_policy_uri")).thenReturn('/aai/v8/network/network-policies/network-policy')
-								
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getNetworkPolicyUri(mockExecution)
-		assertEquals('/aai/v8/network/network-policies/network-policy', uri)
-	}
-	
-	@Test
-	public void testGetNetworkTableReferencesUri() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_route_table_reference_uri")).thenReturn('/aai/v8/network/route-table-references/route-table-reference')
-
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getNetworkTableReferencesUri(mockExecution)
-		assertEquals('/aai/v8/network/route-table-references/route-table-reference', uri)
-	}
-	
-	@Test
-	public void testGetNetworkVceUri() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vce_uri")).thenReturn('/aai/v8/network/vces/vce')
-
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getNetworkVceUri(mockExecution)
-		assertEquals('/aai/v8/network/vces/vce', uri)
-	}
-	
-	@Test
-	public void testGetNetworkL3NetworkUri() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn('/aai/v8/network/l3-networks/l3-network')
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getNetworkL3NetworkUri(mockExecution)
-		assertEquals('/aai/v8/network/l3-networks/l3-network', uri)
-	}
-	
-	@Test
-	public void testGetBusinessCustomerUri() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_customer_uri")).thenReturn('/aai/v8/business/customers/customer')
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getBusinessCustomerUri(mockExecution)
-		assertEquals('/aai/v8/business/customers/customer', uri)
-	}
-	
-	@Test
-	public void testGetCloudInfrastructureCloudRegionEndpoint() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_cloud_region_uri")).thenReturn('/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic')
-		when(mockExecution.getVariable('URN_aai_endpoint')).thenReturn('http://localhost:28090')
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(mockExecution)
-		assertEquals('http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic', uri)
-	}
-	
-	@Test
-	public void testGetCloudInfrastructureCloudRegionUri() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_cloud_region_uri")).thenReturn('/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic')
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getCloudInfrastructureCloudRegionUri(mockExecution)
-		assertEquals('/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic', uri)
-	}
-	
-	@Test
-	public void testGetCloudInfrastructureTenantUri() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_tenant_uri")).thenReturn('/aai/v8/cloud-infrastructure/tenants/tenant')
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getCloudInfrastructureTenantUri(mockExecution)
-		assertEquals('/aai/v8/cloud-infrastructure/tenants/tenant', uri)
-	}
-	
-	@Test
-	public void testGetSearchNodesQueryUri() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_nodes_query_uri")).thenReturn('/aai/v8/search/nodes-query')
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getSearchNodesQueryUri(mockExecution)
-		assertEquals('/aai/v8/search/nodes-query', uri)
-	}
-	
-	@Test
-	public void testGetSearchNodesQueryEndpoint() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_nodes_query_uri")).thenReturn('/aai/v8/search/nodes-query')
-		when(mockExecution.getVariable('URN_aai_endpoint')).thenReturn('http://localhost:28090')
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getSearchNodesQueryEndpoint(mockExecution)
-		assertEquals('http://localhost:28090/aai/v8/search/nodes-query', uri)
-	}
-	
-	@Test
-	public void testGetSearchGenericQueryUri() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
-		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_generic_query_uri")).thenReturn('/aai/v8/search/generic-query')
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def uri = aaiUtil.getSearchGenericQueryUri(mockExecution)
-		assertEquals('/aai/v8/search/generic-query', uri)
-	}
-	
-	@Test
-	public void testGetNamespaceFromUri() {
-		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
-		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
-		CreateAAIVfModule myproc = new CreateAAIVfModule()
-		AaiUtil aaiUtil = new AaiUtil(myproc)
-		def ns = aaiUtil.getNamespaceFromUri('/aai/v6/search/generic-query')
-		assertEquals('http://org.openecomp.aai.inventory/v6', ns)
-	}
-	
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*
+
+import org.mockito.MockitoAnnotations
+import org.mockito.runners.MockitoJUnitRunner
+import org.mockito.internal.debugging.MockitoDebuggerImpl
+import org.junit.Before
+import org.openecomp.mso.bpmn.common.scripts.AaiUtil;
+import org.junit.Rule;
+import org.junit.Test
+import org.junit.Ignore
+import org.junit.runner.RunWith
+import org.junit.Before;
+import org.junit.Test;
+import org.camunda.bpm.engine.ProcessEngineServices
+import org.camunda.bpm.engine.RepositoryService
+import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
+import org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl
+import org.camunda.bpm.engine.repository.ProcessDefinition
+
+@RunWith(MockitoJUnitRunner.class)
+class AaiUtilTest extends MsoGroovyTest {
+
+	@Test
+	public void testGetVersionDefault() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def version = aaiUtil.getVersion(mockExecution, 'l3-network', 'CreateAAIVfModule')
+		assertEquals('8', version)
+	}
+
+	@Test
+	public void testGetVersionResourceSpecific() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_l3_network_version")).thenReturn('7')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def version = aaiUtil.getVersion(mockExecution, 'l3-network', 'CreateAAIVfModule')
+		assertEquals('7', version)
+	}
+
+	@Test
+	public void testGetVersionFlowSpecific() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_custom_CreateAAIVfModule_aai_version")).thenReturn('6')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_l3_network_version")).thenReturn('7')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def version = aaiUtil.getVersion(mockExecution, 'l3-network', 'CreateAAIVfModule')
+		assertEquals('6', version)
+	}
+
+	@Test(expected=java.lang.Exception.class)
+	public void testGetVersionNotDefined() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def version = aaiUtil.getVersion(mockExecution, 'l3-network', 'CreateAAIVfModule')
+	}
+
+	@Test
+	public void testGetUriDefaultVersion() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn('/aai/v8/network/l3-networks/l3-network')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getUri(mockExecution, 'l3-network')
+		assertEquals('/aai/v8/network/l3-networks/l3-network', uri)
+	}
+
+	@Test
+	public void testGetUriFlowAndResourceSpecific() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_CreateAAIVfModule_aai_l3_network_uri")).thenReturn('/aai/v6/network/l3-networks/l3-network')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn('/aai/v8/network/l3-networks/l3-network')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getUri(mockExecution, 'l3-network')
+		assertEquals('/aai/v6/network/l3-networks/l3-network', uri)
+	}
+
+	@Test
+	public void testGetNetworkGenericVnfEndpoint() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_generic_vnf_uri")).thenReturn('/aai/v8/network/generic-vnfs/generic-vnf')
+		when(mockExecution.getVariable('URN_aai_endpoint')).thenReturn('http://localhost:28090')
+
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def endpoint = aaiUtil.getNetworkGenericVnfEndpoint(mockExecution)
+		assertEquals('http://localhost:28090/aai/v8/network/generic-vnfs/generic-vnf', endpoint)
+	}
+
+	@Test
+	public void testGetNetworkGenericVnfUri() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_generic_vnf_uri")).thenReturn('/aai/v8/network/generic-vnfs/generic-vnf')
+
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getNetworkGenericVnfUri(mockExecution)
+		assertEquals('/aai/v8/network/generic-vnfs/generic-vnf', uri)
+	}
+
+	@Test
+	public void testGetNetworkVpnBindingUri() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vpn_binding_uri")).thenReturn('/aai/v8/network/vpn-bindings/vpn-binding')
+
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getNetworkVpnBindingUri(mockExecution)
+		assertEquals('/aai/v8/network/vpn-bindings/vpn-binding', uri)
+	}
+
+	@Test
+	public void testGetNetworkPolicyUri() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_network_policy_uri")).thenReturn('/aai/v8/network/network-policies/network-policy')
+
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getNetworkPolicyUri(mockExecution)
+		assertEquals('/aai/v8/network/network-policies/network-policy', uri)
+	}
+
+	@Test
+	public void testGetNetworkTableReferencesUri() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_route_table_reference_uri")).thenReturn('/aai/v8/network/route-table-references/route-table-reference')
+
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getNetworkTableReferencesUri(mockExecution)
+		assertEquals('/aai/v8/network/route-table-references/route-table-reference', uri)
+	}
+
+	@Test
+	public void testGetNetworkVceUri() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_vce_uri")).thenReturn('/aai/v8/network/vces/vce')
+
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getNetworkVceUri(mockExecution)
+		assertEquals('/aai/v8/network/vces/vce', uri)
+	}
+
+	@Test
+	public void testGetNetworkL3NetworkUri() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_l3_network_uri")).thenReturn('/aai/v8/network/l3-networks/l3-network')
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getNetworkL3NetworkUri(mockExecution)
+		assertEquals('/aai/v8/network/l3-networks/l3-network', uri)
+	}
+
+	@Test
+	public void testGetBusinessCustomerUri() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_customer_uri")).thenReturn('/aai/v8/business/customers/customer')
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getBusinessCustomerUri(mockExecution)
+		assertEquals('/aai/v8/business/customers/customer', uri)
+	}
+
+	@Test
+	public void testGetCloudInfrastructureCloudRegionEndpoint() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_cloud_region_uri")).thenReturn('/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic')
+		when(mockExecution.getVariable('URN_aai_endpoint')).thenReturn('http://localhost:28090')
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getCloudInfrastructureCloudRegionEndpoint(mockExecution)
+		assertEquals('http://localhost:28090/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic', uri)
+	}
+
+	@Test
+	public void testGetCloudInfrastructureCloudRegionUri() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_cloud_region_uri")).thenReturn('/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic')
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getCloudInfrastructureCloudRegionUri(mockExecution)
+		assertEquals('/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic', uri)
+	}
+
+	@Test
+	public void testGetCloudInfrastructureTenantUri() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_tenant_uri")).thenReturn('/aai/v8/cloud-infrastructure/tenants/tenant')
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getCloudInfrastructureTenantUri(mockExecution)
+		assertEquals('/aai/v8/cloud-infrastructure/tenants/tenant', uri)
+	}
+
+	@Test
+	public void testGetSearchNodesQueryUri() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_nodes_query_uri")).thenReturn('/aai/v8/search/nodes-query')
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getSearchNodesQueryUri(mockExecution)
+		assertEquals('/aai/v8/search/nodes-query', uri)
+	}
+
+	@Test
+	public void testGetSearchNodesQueryEndpoint() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_nodes_query_uri")).thenReturn('/aai/v8/search/nodes-query')
+		when(mockExecution.getVariable('URN_aai_endpoint')).thenReturn('http://localhost:28090')
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getSearchNodesQueryEndpoint(mockExecution)
+		assertEquals('http://localhost:28090/aai/v8/search/nodes-query', uri)
+	}
+
+	@Test
+	public void testGetSearchGenericQueryUri() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		when(mockExecution.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn('8')
+		when(mockExecution.getVariable("URN_mso_workflow_default_aai_v8_generic_query_uri")).thenReturn('/aai/v8/search/generic-query')
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def uri = aaiUtil.getSearchGenericQueryUri(mockExecution)
+		assertEquals('/aai/v8/search/generic-query', uri)
+	}
+
+	@Test
+	public void testGetNamespaceFromUri() {
+		ExecutionEntity mockExecution = setupMock('CreateAAIVfModule')
+		when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
+		CreateAAIVfModule myproc = new CreateAAIVfModule()
+		AaiUtil aaiUtil = new AaiUtil(myproc)
+		def ns = aaiUtil.getNamespaceFromUri('/aai/v6/search/generic-query')
+		assertEquals('http://org.openecomp.aai.inventory/v6', ns)
+	}
+
+}
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java
index ea9ca62..e4eee6d 100644
--- a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java
+++ b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/APIResponse.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,18 +25,19 @@
 
 import org.apache.http.Header;
 import org.apache.http.HttpResponse;
+import org.apache.http.message.BasicHeader;
 import org.apache.http.util.EntityUtils;
 
 /**
  * An immutable class that encapsulates an API response.
- * 
+ *
  * @version 1.0
  * @since 1.0
  */
 public class APIResponse {
     private final int statusCode;
     private final byte[] responseBody;
-    private final HttpHeader[] headers;
+    private final BasicHeader[] headers;
 
     /**
      * Internal method used to create http headers using the specified
@@ -45,17 +46,17 @@
      * @param httpResponse used to create headers
      * @return http headers
      */
-    private static HttpHeader[] buildHeaders(final HttpResponse httpResponse) {
+    private static BasicHeader[] buildHeaders(final HttpResponse httpResponse) {
         final Header[] headers = httpResponse.getAllHeaders();
 
-        HttpHeader[] httpHeaders = new HttpHeader[headers.length];
+        BasicHeader[] httpHeaders = new BasicHeader[headers.length];
         for (int i = 0; i < headers.length; ++i) {
             final Header header = headers[i];
             final String name = header.getName();
-            final String value = header.getValue(); 
-            final HttpHeader httpHeader = new HttpHeader(name, value);
+            final String value = header.getValue();
+            final BasicHeader httpHeader = new BasicHeader(name, value);
             httpHeaders[i] = httpHeader;
-        } 
+        }
 
         return httpHeaders;
     }
@@ -89,7 +90,7 @@
     /**
      * Gets the http status code returned by the api server.
      * <p>
-     * For example, status code 200 represents 'OK.' 
+     * For example, status code 200 represents 'OK.'
      *
      * @return status code
      */
@@ -127,15 +128,15 @@
     /**
      * Gets a list of all the headers returned by the API response.
      *
-     * @return an array of all the HttpHeaders 
+     * @return an array of all the BasicHeaders
      */
-    public HttpHeader[] getAllHeaders() {
+    public BasicHeader[] getAllHeaders() {
         // avoid exposing internals, create copy
         return Arrays.copyOf(this.headers, this.headers.length);
     }
 
     public String getFirstHeader(String name) {
-        for (HttpHeader header : headers) {
+        for (BasicHeader header : headers) {
             if (header.getName().equals(name)) {
                 return header.getValue();
             }
diff --git a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HttpHeader.java b/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HttpHeader.java
deleted file mode 100644
index e0d6c30..0000000
--- a/bpmn/MSORESTClient/src/main/java/org/openecomp/mso/rest/HttpHeader.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.rest;
-
-/**
- * An immutable class used to wrap an http header.
- *
- * @version 1.0
- * @since 1.0
- */
-public class HttpHeader {
-    private final String name;
-    private final String value;
-
-    /**
-     * Create an http header using the specified name and value
-     *
-     * @param name name of http header
-     * @param value value of http header
-     */
-    public HttpHeader(final String name, final String value) {
-        if (name == null) {
-            throw new IllegalArgumentException("Name may not be null.");
-        }
-
-        this.name = name;
-        this.value = value;
-    }
-
-    /**
-     * Gets the header name.
-     * 
-     * @return header name
-     */
-    public String getName() {
-        return this.name;
-    }
-
-    /**
-     * Gets the header value.
-     * 
-     * @return header value 
-     */
-    public String getValue() {
-        return this.value;
-    }
-}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java
index e44a44d..2bd4dbd 100644
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseESTest.java
@@ -39,6 +39,7 @@
 import org.apache.http.entity.ByteArrayEntity;
 import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.EnglishReasonPhraseCatalog;
+import org.apache.http.message.BasicHeader;
 import org.apache.http.message.BasicHttpResponse;
 import org.apache.http.message.BasicStatusLine;
 import org.evosuite.runtime.EvoRunner;
@@ -172,7 +173,7 @@
       BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 0, "");
       basicHttpResponse0.addHeader("", "");
       APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
-      HttpHeader[] httpHeaderArray0 = aPIResponse0.getAllHeaders();
+      BasicHeader[] httpHeaderArray0 = aPIResponse0.getAllHeaders();
       assertNotNull(httpHeaderArray0);
   }
 
@@ -180,7 +181,7 @@
   public void test11()  throws Throwable  {
       BasicHttpResponse basicHttpResponse0 = new BasicHttpResponse((ProtocolVersion) null, 1471, "0fVXWr>");
       APIResponse aPIResponse0 = new APIResponse((HttpResponse) basicHttpResponse0);
-      HttpHeader[] httpHeaderArray0 = aPIResponse0.getAllHeaders();
+      BasicHeader[] httpHeaderArray0 = aPIResponse0.getAllHeaders();
       assertNotNull(httpHeaderArray0);
   }
 
@@ -211,11 +212,11 @@
       aPIResponse0.getResponseBodyAsString();
       basicHttpResponse0.getStatusLine();
       aPIResponse0.getStatusCode();
-      HttpHeader[] httpHeaderArray0 = new HttpHeader[2];
-      HttpHeader httpHeader0 = mock(HttpHeader.class, new ViolatedAssumptionAnswer());
+      BasicHeader[] httpHeaderArray0 = new BasicHeader[2];
+      BasicHeader httpHeader0 = mock(BasicHeader.class, new ViolatedAssumptionAnswer());
       doReturn((String) null).when(httpHeader0).getName();
       httpHeaderArray0[0] = httpHeader0;
-      HttpHeader httpHeader1 = mock(HttpHeader.class, new ViolatedAssumptionAnswer());
+      BasicHeader httpHeader1 = mock(BasicHeader.class, new ViolatedAssumptionAnswer());
       httpHeaderArray0[1] = httpHeader1;
       PrivateAccess.setVariable((Class<APIResponse>) APIResponse.class, aPIResponse0, "headers", (Object) httpHeaderArray0);
       // Undeclared exception!
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java
deleted file mode 100644
index f0aeee0..0000000
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 11:47:07 GMT 2016
- */
-
-/*- 
- * ============LICENSE_START======================================================= 
- * OPENECOMP - MSO 
- * ================================================================================ 
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. 
- * ================================================================================ 
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- * ============LICENSE_END========================================================= 
- */ 
-
-package org.openecomp.mso.rest;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
-public class HttpHeaderESTest extends HttpHeaderESTestscaffolding {
-
-  @Test(timeout = 4000)
-  public void test0()  throws Throwable  {
-      HttpHeader httpHeader0 = new HttpHeader("Fw", "WD#>QF/v6_|_A");
-      String string0 = httpHeader0.getValue();
-      assertEquals("WD#>QF/v6_|_A", string0);
-      assertEquals("Fw", httpHeader0.getName());
-  }
-
-  @Test(timeout = 4000)
-  public void test1()  throws Throwable  {
-      HttpHeader httpHeader0 = new HttpHeader("", "");
-      String string0 = httpHeader0.getValue();
-      assertEquals("", string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test2()  throws Throwable  {
-      HttpHeader httpHeader0 = new HttpHeader("Nae may no be null.", "Nae may no be null.");
-      PrivateAccess.setVariable((Class<HttpHeader>) HttpHeader.class, httpHeader0, "name", (Object) null);
-      String string0 = httpHeader0.getName();
-      assertNull(string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test3()  throws Throwable  {
-      HttpHeader httpHeader0 = new HttpHeader("", "EIqJp");
-      String string0 = httpHeader0.getName();
-      assertEquals("EIqJp", httpHeader0.getValue());
-      assertEquals("", string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test4()  throws Throwable  {
-      HttpHeader httpHeader0 = null;
-      try {
-        httpHeader0 = new HttpHeader((String) null, (String) null);
-        fail("Expecting exception: IllegalArgumentException");
-      
-      } catch(IllegalArgumentException e) {
-         //
-         // Name may not be null.
-         //
-         verifyException("org.openecomp.mso.rest.HttpHeader", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test5()  throws Throwable  {
-      HttpHeader httpHeader0 = new HttpHeader("Nae may no be null.", "Nae may no be null.");
-      String string0 = httpHeader0.getName();
-      assertEquals("Nae may no be null.", string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test6()  throws Throwable  {
-      HttpHeader httpHeader0 = new HttpHeader("|SJ`pSz:BCB1o8~", (String) null);
-      String string0 = httpHeader0.getValue();
-      assertNull(string0);
-  }
-}
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java
deleted file mode 100644
index 0438c1f..0000000
--- a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/HttpHeaderESTestscaffolding.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 11:47:07 GMT 2016
- */
-
-/*- 
- * ============LICENSE_START======================================================= 
- * OPENECOMP - MSO 
- * ================================================================================ 
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. 
- * ================================================================================ 
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- * ============LICENSE_END========================================================= 
- */ 
-
-package org.openecomp.mso.rest;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class HttpHeaderESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.rest.HttpHeader"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HttpHeaderESTestscaffolding.class.getClassLoader() ,
-      "org.openecomp.mso.rest.HttpHeader"
-    );
-  } 
-
-  private static void resetClasses() {
-  }
-}
