diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/Urls.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/Urls.java
index 3977f16..ea1c9ef 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/Urls.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/Urls.java
@@ -117,19 +117,19 @@
 
 	// *****************************************ECOMP User
 	// URL's*****************************************************
-	final String ECOMP_PUSH_USER = "http://%s:%s/api/user";
+	final String ECOMP_PUSH_USER = "http://%s:%s/api/v2/user";
 
-	final String ECOMP_EDIT_USER = "http://%s:%s/api/user/%s";
+	final String ECOMP_EDIT_USER = "http://%s:%s/api/v2/user/%s";
 
-	final String ECOMP_GET_USER = "http://%s:%s/api/user/%s";
+	final String ECOMP_GET_USER = "http://%s:%s/api/v2/user/%s";
 
-	final String ECOMP_GET_ALL_USERS = "http://%s:%s/api/users";
+	final String ECOMP_GET_ALL_USERS = "http://%s:%s/api/v2/users";
 
-	final String ECOMP_GET_ALL_AVAILABLE_ROLES = "http://%s:%s/api/roles";
+	final String ECOMP_GET_ALL_AVAILABLE_ROLES = "http://%s:%s/api/v2/roles";
 
-	final String ECOMP_PUSH_USER_ROLES = "http://%s:%s/api/user/%s/roles";
+	final String ECOMP_PUSH_USER_ROLES = "http://%s:%s/api/v2/user/%s/roles";
 
-	final String ECOMP_GET_USER_ROLES = "http://%s:%s/api/user/%s/roles";
+	final String ECOMP_GET_USER_ROLES = "http://%s:%s/api/v2/user/%s/roles";
 
 	// *****************************************Elements*************************************************************
 	final String GET_TAGS_LIST = "http://%s:%s/sdc2/rest/v1/tags";
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/attribute/ComponentInstanceAttributeTest.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/attribute/ComponentInstanceAttributeTest.java
index b1d04ba..537a709 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/attribute/ComponentInstanceAttributeTest.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/attribute/ComponentInstanceAttributeTest.java
@@ -74,7 +74,7 @@
 				.filter(att -> att.getName().equals("private_address")).findAny().get();
 		// update attribute on vfc instance
 		final Resource vfWithInsatncePreUpdate = swallowException(
-				() -> (Resource) AtomicOperationUtils.getCompoenntObject(vf, UserRoleEnum.DESIGNER));
+				() -> (Resource) AtomicOperationUtils.getComponentObject(vf, UserRoleEnum.DESIGNER));
 		ComponentInstanceProperty attributeOfRI = attributeGetter.apply(vfWithInsatncePreUpdate);
 		final String newAttValue = "NewValue";
 		attributeOfRI.setValue(newAttValue);
@@ -86,7 +86,7 @@
 				BaseRestUtils.acceptHeaderData));
 		// Retrieve updated vf and verify attribute was updated
 		final Resource vfWithInsatncePostUpdate = swallowException(
-				() -> (Resource) AtomicOperationUtils.getCompoenntObject(vf, UserRoleEnum.DESIGNER));
+				() -> (Resource) AtomicOperationUtils.getComponentObject(vf, UserRoleEnum.DESIGNER));
 		ComponentInstanceProperty updatedAttribute = attributeGetter.apply(vfWithInsatncePostUpdate);
 		assertEquals(updatedAttribute.getValue(), newAttValue);
 
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/AndreyTest.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/AndreyTest.java
index 6e36e1b..45c6b18 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/AndreyTest.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/devCI/AndreyTest.java
@@ -45,26 +45,33 @@
 
 public class AndreyTest {
 
+	private static ToscaDefinition parseToscaYamlToJavaObject;
+
+
 	public static void main(String[] args) throws Exception {
 		ToscaDefinition toscaDefinition;
 		System.out.println("start " + new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new Date()));
 //        File path = new File("C:/Data/D2.0/TOSCA_Ex/Definitions/tosca_definition_version.yaml");
 //        File path = new File("C:/Data/D2.0/TOSCA_Ex/resource-Vl11Vl10-template.yml");
-        File path = new File("C:/Data/D2.0/TOSCA_Ex/service-Servicepxtc-template US822998.yml");
-        File csarPath = new File("C:/Data/D2.0/TOSCA_Ex/Nested.csar");
+//        File path = new File("C:/Data/D2.0/TOSCA_Ex/service-Servicepxtc-template US822998.yml");
+//        File path = new File("C:/Data/FileToParse/Definitions/service-Ciservice513e6fa67d07-template.yml");
+		toscaDefinition = ToscaParserUtils.parseToscaMainYamlToJavaObjectByCsarLocation(new File("C:/Data/FileToParse/LDSA/LDSA_amdocs.csar"));
+//        File path = new File("C:/Data/FileToParse/Definitions/resource-Civfonboarded2016006VvmVvm301607E2100a9b04-template.yml");
+//        File csarPath = new File("C:/Data/D2.0/TOSCA_Ex/Nested.csar");
 
-        toscaDefinition = ToscaParserUtils.parseToscaYamlToJavaObject(path);
+		
+//        toscaDefinition = ToscaParserUtils.parseToscaYamlToJavaObject(path);
         System.out.println("listTypeHeatMetaDefinition start " + new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new Date()));
-        List<TypeHeatMetaDefinition> listTypeHeatMetaDefinition = CsarParserUtils.getListTypeHeatMetaDefinition(csarPath);
+//        List<TypeHeatMetaDefinition> listTypeHeatMetaDefinition = CsarParserUtils.getListTypeHeatMetaDefinition(csarPath);
         System.out.println("get service start " + new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new Date()));
-        System.out.println(listTypeHeatMetaDefinition);
-        for(TypeHeatMetaDefinition typeHeatMetaDefinition : listTypeHeatMetaDefinition){
-        	for(GroupHeatMetaDefinition groupHeatMetaDefinition : typeHeatMetaDefinition.getGroupHeatMetaDefinition()){
-        		List<HeatMetaFirstLevelDefinition> artifactList = groupHeatMetaDefinition.getArtifactList();
-        		boolean isBase = groupHeatMetaDefinition.getPropertyHeatMetaDefinition().getValue();
-        	}
-        	
-        }
+//        System.out.println(listTypeHeatMetaDefinition);
+//        for(TypeHeatMetaDefinition typeHeatMetaDefinition : listTypeHeatMetaDefinition){
+//        	for(GroupHeatMetaDefinition groupHeatMetaDefinition : typeHeatMetaDefinition.getGroupHeatMetaDefinition()){
+//        		List<HeatMetaFirstLevelDefinition> artifactList = groupHeatMetaDefinition.getArtifactList();
+//        		boolean isBase = groupHeatMetaDefinition.getPropertyHeatMetaDefinition().getValue();
+//        	}
+//        	
+//        }
         System.out.println("Finished");
         System.out.println("get service start " + new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new Date()));
 	}
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/general/BasicHttpAuthenticationTest.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/general/BasicHttpAuthenticationTest.java
index c52ee47..66bc153 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/general/BasicHttpAuthenticationTest.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/general/BasicHttpAuthenticationTest.java
@@ -238,7 +238,7 @@
 		assertTrue(restResponse.getHeaderFields().containsKey(WWW_AUTHENTICATE));
 		List<String> getAuthenticateHeader = restResponse.getHeaderFields().get(WWW_AUTHENTICATE);
 		assertEquals("www-authenticate header contains more then one value", 1, getAuthenticateHeader.size());
-		assertTrue(getAuthenticateHeader.get(0).equals("Basic realm=" + "\"ASDC\""));
+		assertTrue(getAuthenticateHeader.get(0).equals("Basic realm=" + "\"SDC\""));
 
 		validateAuditAuthentication("", AUTH_REQUIRED, ComponentTypeEnum.SERVICE);
 	}
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportToscaResourceTest.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportToscaResourceTest.java
index 8ce8dc5..b460b9f 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportToscaResourceTest.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/ImportToscaResourceTest.java
@@ -1816,8 +1816,8 @@
 		importReqDetailsFather.compareRequirementsOrCapabilities(capabilities, capabilitiesFromResponse);
 	}
 
-	// DE202329
-	@Test(enabled = false)
+	// DE202329 - TDP -154379 
+	@Test(enabled = true)
 	public void requirementWithMissingTypeTest() throws Exception {
 		String fatherName = "father";
 		String fatherFileName = "DerivedFromWebApplication_HasNoReqType.yml";
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/MultipleResourceUpdate.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/MultipleResourceUpdate.java
index 0a7b4a9..a33ee71 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/MultipleResourceUpdate.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/MultipleResourceUpdate.java
@@ -86,7 +86,7 @@
 		ComponentInstance instanceCP2 = AtomicOperationUtils
 				.addComponentInstanceToComponentContainer(cp2, vf, UserRoleEnum.DESIGNER, true).left().value();
 
-		vf = (Resource) AtomicOperationUtils.getCompoenntObject(vf, UserRoleEnum.DESIGNER);
+		vf = (Resource) AtomicOperationUtils.getComponentObject(vf, UserRoleEnum.DESIGNER);
 
 		// Create Vertex(Link/Associate 2 Resource Instances on Canvas)
 		AtomicOperationUtils.associate2ResourceInstances(vf, instanceCP1, instanceVL, AssocType.LINKABLE.getAssocType(),
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaDefinition.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaDefinition.java
index 5a89a67..18b2329 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaDefinition.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaDefinition.java
@@ -111,7 +111,7 @@
         typeDescription.putMapPropertyType("metadata", String.class, String.class);
 //        TODO Andrey imports format
         typeDescription.putMapPropertyType("imports", String.class, ToscaImportsDefinition.class);
-        typeDescription.putListPropertyType("imports", List.class);
+//        typeDescription.putListPropertyType("imports", List.class);
         typeDescription.putMapPropertyType("node_types", String.class, ToscaNodeTypesDefinition.class);
     	return typeDescription;
 	}
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaParameterConstants.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaParameterConstants.java
new file mode 100644
index 0000000..18d7d7d
--- /dev/null
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/tosca/datatypes/ToscaParameterConstants.java
@@ -0,0 +1,9 @@
+package org.openecomp.sdc.ci.tests.tosca.datatypes;
+
+public interface ToscaParameterConstants {
+
+	public static final String ENTRY_DEFINITION = "Entry-Definitions";
+	public static final String TOSCA_META_PATH = "TOSCA-Metadata/TOSCA.meta";
+	public static final String HEAT_META_PATH = "Artifacts/HEAT.meta";
+	public static final String IMPORT_STRUCTURE = "importStructure";
+}
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/CsarParserUtils.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/CsarParserUtils.java
index 69c8b2f..cd6687b 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/CsarParserUtils.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/CsarParserUtils.java
@@ -30,11 +30,13 @@
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
+import org.json.simple.parser.ParseException;
 import org.openecomp.sdc.ci.tests.datatypes.GroupHeatMetaDefinition;
 import org.openecomp.sdc.ci.tests.datatypes.HeatMetaFirstLevelDefinition;
 import org.openecomp.sdc.ci.tests.datatypes.PropertyHeatMetaDefinition;
 import org.openecomp.sdc.ci.tests.datatypes.TypeHeatMetaDefinition;
 import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum;
+import org.openecomp.sdc.ci.tests.tosca.datatypes.ToscaParameterConstants;
 import org.openecomp.sdc.ci.tests.utils.validation.CsarValidationUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -42,39 +44,33 @@
 public class CsarParserUtils {
 	private static Logger log = LoggerFactory.getLogger(CsarValidationUtils.class.getName());
 
-	public static List<TypeHeatMetaDefinition> getListTypeHeatMetaDefinition(File csarUUID) throws Exception {
+	public static List<TypeHeatMetaDefinition> getListTypeHeatMetaDefinition(File csarFileLocation) throws Exception {
 
-		String artifactHeatMetaLocation = "Artifacts/HEAT.meta";
+		String artifactHeatMetaLocation = ToscaParameterConstants.HEAT_META_PATH;
+		String csarPayload = ToscaParserUtils.getYamlPayloadFromCsar(csarFileLocation, artifactHeatMetaLocation);
+		return getListTypeHeatMetaDefinitionByPayload(csarPayload);
+	}
+
+	public static List<TypeHeatMetaDefinition> getListTypeHeatMetaDefinition(String csarUUID) throws Exception {
+		
+		String artifactHeatMetaLocation = ToscaParameterConstants.HEAT_META_PATH;
+		String csarPayload = ToscaParserUtils.getCsarPayload(csarUUID, artifactHeatMetaLocation);
+		return getListTypeHeatMetaDefinitionByPayload(csarPayload);
+	}
+
+	public static List<TypeHeatMetaDefinition> getListTypeHeatMetaDefinitionByPayload(String csarPayload) throws ParseException {
 		JSONParser parser = new JSONParser();
-		String csarPayload = CsarValidationUtils.getCsarPayload(csarUUID, artifactHeatMetaLocation);
 		if (csarPayload != null) {
 			Object parse = parser.parse(csarPayload);
 			JSONObject jsonObject = (JSONObject) parse;
-			JSONObject jsonObjectImportStructure = (JSONObject) jsonObject.get("importStructure");
+			JSONObject jsonObjectImportStructure = (JSONObject) jsonObject.get(ToscaParameterConstants.IMPORT_STRUCTURE);
 			List<TypeHeatMetaDefinition> listHeatMetaDefenition = new ArrayList<TypeHeatMetaDefinition>();
 			listHeatMetaDefenition = getArtifactsByGroup(jsonObjectImportStructure, listHeatMetaDefenition);
 			return listHeatMetaDefenition;
 		}
 		return null;
-
 	}
 	
-	public static List<TypeHeatMetaDefinition> getListTypeHeatMetaDefinition(String csarUUID) throws Exception {
-
-		String artifactHeatMetaLocation = "Artifacts/HEAT.meta";
-		JSONParser parser = new JSONParser();
-		String csarPayload = CsarValidationUtils.getCsarPayload(csarUUID, artifactHeatMetaLocation);
-		if (csarPayload != null) {
-			Object parse = parser.parse(csarPayload);
-			JSONObject jsonObject = (JSONObject) parse;
-			JSONObject jsonObjectImportStructure = (JSONObject) jsonObject.get("importStructure");
-			List<TypeHeatMetaDefinition> listHeatMetaDefenition = new ArrayList<TypeHeatMetaDefinition>();
-			listHeatMetaDefenition = getArtifactsByGroup(jsonObjectImportStructure, listHeatMetaDefenition);
-			return listHeatMetaDefenition;
-		}
-		return null;
-
-	}
 	
 	protected static List<TypeHeatMetaDefinition> getArtifactsByGroup(JSONObject jsonObjectImportStructure, List<TypeHeatMetaDefinition> listHeatMetaDefenition) {
 
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/ToscaParserUtils.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/ToscaParserUtils.java
index 26fac7f..3bae41f 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/ToscaParserUtils.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/ToscaParserUtils.java
@@ -21,19 +21,30 @@
 package org.openecomp.sdc.ci.tests.utils;
 
 import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
 import java.util.Map;
 import java.util.Set;
 
 import org.openecomp.sdc.ci.tests.datatypes.enums.ToscaKeysEnum;
+import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum;
 import org.openecomp.sdc.ci.tests.tosca.datatypes.ToscaDefinition;
 import org.openecomp.sdc.ci.tests.tosca.datatypes.ToscaGroupsTopologyTemplateDefinition;
 import org.openecomp.sdc.ci.tests.tosca.datatypes.ToscaNodeTemplatesTopologyTemplateDefinition;
+import org.openecomp.sdc.ci.tests.tosca.datatypes.ToscaParameterConstants;
 import org.openecomp.sdc.ci.tests.tosca.datatypes.ToscaSubstitutionMappingsDefinition;
 import org.openecomp.sdc.ci.tests.tosca.datatypes.ToscaTopologyTemplateDefinition;
+import org.openecomp.sdc.ci.tests.utils.general.ElementFactory;
+import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils;
+import org.openecomp.sdc.ci.tests.utils.rest.ImportRestUtils;
 import org.openecomp.sdc.ci.tests.utils.validation.CsarValidationUtils;
+import org.openecomp.sdc.common.rest.api.RestResponseAsByteArray;
+import org.openecomp.sdc.common.util.ZipUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.yaml.snakeyaml.TypeDescription;
@@ -45,20 +56,56 @@
 
 	private static Logger log = LoggerFactory.getLogger(ToscaParserUtils.class.getName());
 
-	public static ToscaDefinition parseToscaYamlToJavaObject(String csarUUID) throws Exception {
+	
+	/**method get csarUUID and send GET API request toward BE 
+	 * @param csarUUID
+	 * @return
+	 * @throws Exception
+	 */
+	public static ToscaDefinition parseToscaYamlToJavaObjectByCsarUuid(String csarUUID) throws Exception {
 		
 		ToscaDefinition toscaDefinition = null;
-		String TOSCAMetaLocation = "TOSCA-Metadata/TOSCA.meta";
+		String TOSCAMetaLocation = ToscaParameterConstants.TOSCA_META_PATH;
 		Map<?, ?> map = getToscaYamlMap(csarUUID, TOSCAMetaLocation);
 		assertNotNull("Tosca Entry-Definitions is null", map);
 		if (map != null) {
-			File definitionYamlLocation = (File) map.get("Entry-Definitions");
+			File definitionYamlLocation = (File) map.get(ToscaParameterConstants.ENTRY_DEFINITION);
 			toscaDefinition = parseToscaYamlToJavaObject(definitionYamlLocation);
 		}
 		return toscaDefinition;
 
 	}
 
+	/**method read csar from location
+	 * @param csarNameLocation - full path with csar name 
+	 * @return
+	 * @throws Exception
+	 */
+	public static ToscaDefinition parseToscaMainYamlToJavaObjectByCsarLocation(File csarNameLocation) throws Exception {
+		
+		ToscaDefinition toscaDefinition = null;
+		String TOSCAMetaLocation = ToscaParameterConstants.TOSCA_META_PATH;
+//		read file location of main yaml file(location+name) from TOSCA.meta file by 
+		Map<?, ?> map = getToscaYamlMap(csarNameLocation, TOSCAMetaLocation);
+		
+		assertNotNull("Tosca Entry-Definitions is null", map);
+
+		String definitionYamlLocation = (String) map.get(ToscaParameterConstants.ENTRY_DEFINITION);
+		String csarPayload = getYamlPayloadFromCsar(csarNameLocation, definitionYamlLocation);
+		toscaDefinition = parseToscaYamlPayloadToJavaObject(csarPayload);
+		return toscaDefinition;
+
+	}
+	
+	public static ToscaDefinition parseToscaAnyYamlToJavaObjectByCsarLocation(File csarNameLocation, String yamlLocation) throws Exception {
+		
+		ToscaDefinition toscaDefinition = null;
+		String csarPayload = getYamlPayloadFromCsar(csarNameLocation, yamlLocation);
+		toscaDefinition = parseToscaYamlPayloadToJavaObject(csarPayload);
+		return toscaDefinition;
+
+	}
+	
 	public static ToscaDefinition parseToscaYamlToJavaObject(File path) throws Exception {
 
 		ToscaDefinition toscaDefinition = null;
@@ -72,7 +119,7 @@
 			System.out.println("Exception: " + e);
 		}
         
-        Constructor constructor = getConstructor();
+        Constructor constructor = initToscaDefinitionObject();
     	
         Yaml yaml = new Yaml(constructor);
         try {
@@ -90,7 +137,7 @@
 	public static ToscaDefinition parseToscaYamlPayloadToJavaObject(String payload){
 
 		ToscaDefinition toscaDefinition = null;
-        Constructor constructor = getConstructor();
+        Constructor constructor = initToscaDefinitionObject();
     	
         Yaml yaml = new Yaml(constructor);
         try {
@@ -104,23 +151,23 @@
 	}
 	
 	
-	public static Constructor getConstructor() {
-		Constructor constructor = new Constructor(ToscaDefinition.class);
-        constructor.addTypeDescription(ToscaDefinition.getTypeDescription());
-        constructor.addTypeDescription(ToscaTopologyTemplateDefinition.getTypeDescription());
-    	constructor.addTypeDescription(ToscaNodeTemplatesTopologyTemplateDefinition.getTypeDescription());
-    	constructor.addTypeDescription(ToscaGroupsTopologyTemplateDefinition.getTypeDescription());
-    	constructor.addTypeDescription(ToscaSubstitutionMappingsDefinition.getTypeDescription());
+	public static Constructor initToscaDefinitionObject() {
+		Constructor toscaStructure = new Constructor(ToscaDefinition.class);
+        toscaStructure.addTypeDescription(ToscaDefinition.getTypeDescription());
+        toscaStructure.addTypeDescription(ToscaTopologyTemplateDefinition.getTypeDescription());
+    	toscaStructure.addTypeDescription(ToscaNodeTemplatesTopologyTemplateDefinition.getTypeDescription());
+    	toscaStructure.addTypeDescription(ToscaGroupsTopologyTemplateDefinition.getTypeDescription());
+    	toscaStructure.addTypeDescription(ToscaSubstitutionMappingsDefinition.getTypeDescription());
     	
 //    	Skip properties which are found in YAML, but not found in POJO
     	PropertyUtils propertyUtils = new PropertyUtils();
     	propertyUtils.setSkipMissingProperties(true);
-    	constructor.setPropertyUtils(propertyUtils);
-		return constructor;
+    	toscaStructure.setPropertyUtils(propertyUtils);
+		return toscaStructure;
 	}
 
-	public static Map<?, ?> getToscaYamlMap(String csarUUID, String fileLocation) throws Exception {
-		String csarPayload = CsarValidationUtils.getCsarPayload(csarUUID, fileLocation);
+	public static Map<?, ?> getToscaYamlMap(String csarUUID, String yamlFileLocation) throws Exception {
+		String csarPayload = getCsarPayload(csarUUID, yamlFileLocation);
 		if (csarPayload != null) {
 			Yaml yaml = new Yaml();
 			Map<?, ?> map = (Map<?, ?>) yaml.load(csarPayload);
@@ -129,6 +176,49 @@
 		return null;
 	}
 	
+	public static Map<?, ?> getToscaYamlMap(File csarPath, String yamlFileLocation) throws Exception {
+		String csarPayload = getYamlPayloadFromCsar(csarPath, yamlFileLocation);
+		if (csarPayload != null) {
+			Yaml yaml = new Yaml();
+			Map<?, ?> map = (Map<?, ?>) yaml.load(csarPayload);
+			return map;
+		}
+		return null;
+	}
+	
+	
+	public static String getCsarPayload(String csarName, String yamlFileLocation) throws Exception {
+
+		RestResponseAsByteArray csar = ImportRestUtils.getCsar(csarName, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER));
+		assertTrue("Return response code different from 200", csar.getHttpStatusCode() == BaseRestUtils.STATUS_CODE_SUCCESS);
+		byte[] data = csar.getResponse();
+		return getDataFromZipFileByBytes(yamlFileLocation, data);
+
+	}
+
+	public static String getYamlPayloadFromCsar(File csarName, String fileLocation) throws Exception {
+		
+		Path path = csarName.toPath();
+		byte[] data = Files.readAllBytes(path);
+		return getDataFromZipFileByBytes(fileLocation, data);
+		
+	}
+
+	/** method get file data from zip data by file location in the zip structure 
+	 * @param fileLocation
+	 * @param data
+	 * @return
+	 */
+	public static String getDataFromZipFileByBytes(String fileLocation, byte[] data) {
+		Map<String, byte[]> readZip = null;
+		if (data != null && data.length > 0) {
+			readZip = ZipUtil.readZip(data);
+
+		}
+		byte[] artifactsBs = readZip.get(fileLocation);
+		String str = new String(artifactsBs, StandardCharsets.UTF_8);
+		return str;
+	}
 /*	public static Map<?, ?> getToscaYamlMap(String csarUUID, String fileLocation) throws Exception {
 		String csarPayload = CsarValidationUtils.getCsarPayload(csarUUID, fileLocation);
 		if (csarPayload != null) {
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/AtomicOperationUtils.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/AtomicOperationUtils.java
index 207c4bb..17148ce 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/AtomicOperationUtils.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/AtomicOperationUtils.java
@@ -261,7 +261,7 @@
 		LifeCycleStatesEnum curentCompState = LifeCycleStatesEnum.findByCompState(component.getLifecycleState().toString());
 
 		if (curentCompState == targetState) {
-			component = getCompoenntObject(component, userRole);
+			component = getComponentObject(component, userRole);
 			return Pair.of(component, null);
 		}
 		// List<LifeCycleStatesEnum> lifeCycleStatesEnumOrigList = new
@@ -299,7 +299,7 @@
 			}
 
 		}
-		Component componentJavaObject = getCompoenntObject(component, userRole);
+		Component componentJavaObject = getComponentObject(component, userRole);
 
 		if (validateState == true && isValidationFailed == true) {
 			assertTrue("change state failed" + lifeCycleStatesResponse.getResponse(), false);
@@ -431,6 +431,12 @@
 		Service container = ResponseParser.convertServiceResponseToJavaObject(serviceResponse.getResponse());
 		return container;
 	}
+	
+	public static Service getServiceObject(String uniqueId) throws Exception {
+		RestResponse serviceResponse = ServiceRestUtils.getService(uniqueId);
+		Service container = ResponseParser.convertServiceResponseToJavaObject(serviceResponse.getResponse());
+		return container;
+	}
 
 	public static Product getProductObject(Component containerDetails, UserRoleEnum userRole) throws Exception {
 		User defaultUser = ElementFactory.getDefaultUser(userRole);
@@ -439,7 +445,7 @@
 		return container;
 	}
 
-	public static Component getCompoenntObject(Component containerDetails, UserRoleEnum userRole) throws Exception {
+	public static Component getComponentObject(Component containerDetails, UserRoleEnum userRole) throws Exception {
 		User defaultUser = ElementFactory.getDefaultUser(userRole);
 
 		switch (containerDetails.getComponentType()) {
@@ -521,7 +527,7 @@
 
 		if (changeComponentInstanceVersionResp.getErrorCode() == BaseRestUtils.STATUS_CODE_SUCCESS) {
 
-			Component compoenntObject = AtomicOperationUtils.getCompoenntObject(containerDetails, userRole);
+			Component compoenntObject = AtomicOperationUtils.getComponentObject(containerDetails, userRole);
 			ComponentInstance componentInstanceJavaObject = ResponseParser.convertComponentInstanceResponseToJavaObject(changeComponentInstanceVersionResp.getResponse());
 
 			return Either.left(Pair.of(compoenntObject, componentInstanceJavaObject));
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java
index 25fce34..e387cd2 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/CatalogRestUtils.java
@@ -21,8 +21,7 @@
 package org.openecomp.sdc.ci.tests.utils.rest;
 
 import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
+import java.util.*;
 
 import org.openecomp.sdc.ci.tests.api.Urls;
 import org.openecomp.sdc.ci.tests.config.Config;
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/LifecycleRestUtils.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/LifecycleRestUtils.java
index d53d2da..22a352c 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/LifecycleRestUtils.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/LifecycleRestUtils.java
@@ -262,19 +262,14 @@
 			LifeCycleStatesEnum LifeCycleStatesEnum) throws Exception {
 		Config config = Utils.getConfig();
 		String url = String.format(Urls.CHANGE_COMPONENT_LIFECYCLE_STATE, config.getCatalogBeHost(),
-				config.getCatalogBePort(), ComponentTypeEnum.findParamByType(component.getComponentType()),
-				component.getUniqueId(), LifeCycleStatesEnum);
-		RestResponse LifeCycleStatesEnumServiceResponse = sendPost(url, createLifecycleCommentJson(COMMENT),
-				sdncModifierDetails.getUserId(), acceptHeaderData);
+				config.getCatalogBePort(), ComponentTypeEnum.findParamByType(component.getComponentType()), component.getUniqueId(), LifeCycleStatesEnum);
+		RestResponse LifeCycleStatesEnumServiceResponse = sendPost(url, createLifecycleCommentJson(COMMENT), sdncModifierDetails.getUserId(), acceptHeaderData);
 		if (LifeCycleStatesEnumServiceResponse.getErrorCode() == STATUS_CODE_SUCCESS) {
-			String productUniqueId = ResponseParser
-					.getValueFromJsonResponse(LifeCycleStatesEnumServiceResponse.getResponse(), "uniqueId");
+			String productUniqueId = ResponseParser.getValueFromJsonResponse(LifeCycleStatesEnumServiceResponse.getResponse(), "uniqueId");
 			component.setUniqueId(productUniqueId);
-			String productVersion = ResponseParser
-					.getValueFromJsonResponse(LifeCycleStatesEnumServiceResponse.getResponse(), "version");
+			String productVersion = ResponseParser.getValueFromJsonResponse(LifeCycleStatesEnumServiceResponse.getResponse(), "version");
 			component.setVersion(productVersion);
-			String newLifecycleState = ResponseParser
-					.getValueFromJsonResponse(LifeCycleStatesEnumServiceResponse.getResponse(), "lifecycleState");
+			String newLifecycleState = ResponseParser.getValueFromJsonResponse(LifeCycleStatesEnumServiceResponse.getResponse(), "lifecycleState");
 			component.setLifecycleState(LifecycleStateEnum.valueOf(newLifecycleState));
 		}
 		return LifeCycleStatesEnumServiceResponse;
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResponseParser.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResponseParser.java
index ad9f482..9595383 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResponseParser.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResponseParser.java
@@ -60,6 +60,7 @@
 import org.openecomp.sdc.ci.tests.datatypes.ServiceDistributionStatus;
 import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse;
 import org.openecomp.sdc.ci.tests.utils.Utils;
+import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils;
 
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.google.gson.Gson;
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ServiceRestUtils.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ServiceRestUtils.java
index a93587d..9ba4a90 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ServiceRestUtils.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ServiceRestUtils.java
@@ -94,6 +94,7 @@
 	}
 
 	public static RestResponse createService(ServiceReqDetails service, User user) throws Exception {
+
 		Config config = Utils.getConfig();
 		String url = String.format(Urls.CREATE_SERVICE, config.getCatalogBeHost(), config.getCatalogBePort());
 		String serviceBodyJson = gson.toJson(service);
@@ -256,6 +257,7 @@
 				config.getCatalogBePort(), serviceName, serviceVersion);
 		RestResponse deleteResponse = http.httpSendDelete(url, headersMap);
 
+		deleteMarkedServices(sdncModifierDetails.getUserId());
 		return deleteResponse;
 	}
 
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/CsarValidationUtils.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/CsarValidationUtils.java
index 0fe1153..7423dbc 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/CsarValidationUtils.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/validation/CsarValidationUtils.java
@@ -44,39 +44,6 @@
 
 public class CsarValidationUtils {
 
-	public static String getCsarPayload(String csarName, String fileLocation) throws Exception {
-
-		RestResponseAsByteArray csar = ImportRestUtils.getCsar(csarName, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER));
-		assertTrue("Return response code different from 200", csar.getHttpStatusCode() == BaseRestUtils.STATUS_CODE_SUCCESS);
-		Map<String, byte[]> readZip = null;
-		byte[] data = csar.getResponse();
-		if (data != null && data.length > 0) {
-			readZip = ZipUtil.readZip(data);
-
-		}
-		byte[] artifactsBs = readZip.get(fileLocation);
-		String str = new String(artifactsBs, StandardCharsets.UTF_8);
-		return str;
-
-	}
-	
-	public static String getCsarPayload(File csarName, String fileLocation) throws Exception {
-
-//		RestResponseAsByteArray csar = ImportRestUtils.getCsar(csarName, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER));
-//		assertTrue("Return response code different from 200", csar.getHttpStatusCode() == BaseRestUtils.STATUS_CODE_SUCCESS);
-		Map<String, byte[]> readZip = null;
-		Path path = csarName.toPath();
-		
-		byte[] data = Files.readAllBytes(path);
-		if (data != null && data.length > 0) {
-			readZip = ZipUtil.readZip(data);
-		}
-		byte[] artifactsBs = readZip.get(fileLocation);
-		String str = new String(artifactsBs, StandardCharsets.UTF_8);
-		return str;
-
-	}
-
 	public static void validateCsarVfArtifact(String csarUUID, Resource resource) throws Exception {
 
 		List<TypeHeatMetaDefinition> listTypeHeatMetaDefinition = CsarParserUtils.getListTypeHeatMetaDefinition(csarUUID);
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/CRUDExternalAPI.java b/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/CRUDExternalAPI.java
index a680990..127ae54 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/CRUDExternalAPI.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/CRUDExternalAPI.java
@@ -80,7 +80,6 @@
 import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils;
 import org.openecomp.sdc.ci.tests.utils.general.ElementFactory;
 import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils;
-import org.openecomp.sdc.ci.tests.utils.rest.AutomationUtils;
 import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils;
 import org.openecomp.sdc.ci.tests.utils.validation.AuditValidationUtils;
 import org.openecomp.sdc.ci.tests.utils.validation.DistributionValidationUtils;
@@ -356,42 +355,45 @@
 		// create component/s & upload artifact via external api
 		if(ComponentTypeEnum.RESOURCE_INSTANCE == componentTypeEnum) {
 			component = getComponentWithResourceInstanceInTargetLifeCycleState(chosenLifeCycleState, resourceTypeEnum);
-			
 			restResponse = uploadArtifactOfRIIncludingValiditionOfAuditAndResponseCode(component, component.getComponentInstances().get(0), ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, 200);
-			component =AtomicOperationUtils.getCompoenntObject(component, UserRoleEnum.DESIGNER);
-			
- 			if((LifeCycleStatesEnum.CERTIFICATIONREQUEST == chosenLifeCycleState) && (!component.getComponentType().toString().equals(ComponentTypeEnum.RESOURCE.toString()))) {
-//				numberOfArtifact = component.getComponentInstances().get(0).getDeploymentArtifacts().size();
-				numberOfArtifact = (component.getComponentInstances().get(0).getDeploymentArtifacts() == null ? 0 : component.getComponentInstances().get(0).getDeploymentArtifacts().size());
-			} else {
-//				numberOfArtifact = component.getComponentInstances().get(0).getDeploymentArtifacts().size() + 1;
-				numberOfArtifact = (component.getComponentInstances().get(0).getDeploymentArtifacts() == null ? 0 : component.getComponentInstances().get(0).getDeploymentArtifacts().size());
-			}
+			component = getNewerVersionOfComponent(component, chosenLifeCycleState);
+			numberOfArtifact = (component.getComponentInstances().get(0).getDeploymentArtifacts() == null ? 0 : component.getComponentInstances().get(0).getDeploymentArtifacts().size());
 		} else {
 			component = getComponentInTargetLifeCycleState(componentTypeEnum.toString(), UserRoleEnum.DESIGNER, chosenLifeCycleState, resourceTypeEnum);
-			
 			restResponse = uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, 200);
-			numberOfArtifact = component.getDeploymentArtifacts().size() + 1;
+			component = updateComponentDetailsByLifeCycleState(chosenLifeCycleState, component);
+			numberOfArtifact = component.getDeploymentArtifacts().size();
 		}
 		
-		
-		
 		ArtifactDefinition responseArtifact = getArtifactDataFromJson(restResponse.getResponse());
-		component = getNewerVersionOfComponent(component, chosenLifeCycleState);
-		
 		// Get list of deployment artifact + download them via external API
 		Map<String, ArtifactDefinition> deploymentArtifacts = getDeploymentArtifactsOfAsset(component, componentTypeEnum);
-		Assert.assertEquals(numberOfArtifact, deploymentArtifacts.keySet().size(), "Expected that number of deployment artifact will be increase by one.");
+		Assert.assertEquals(numberOfArtifact, deploymentArtifacts.keySet().size(), "Expected that number of deployment artifacts will be increase by one.");
 		
 		// Download the uploaded artifact via external API
 		downloadResourceDeploymentArtifactExternalAPI(component, deploymentArtifacts.get(responseArtifact.getArtifactLabel()), ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, componentTypeEnum);
-	
+		return component;
+	}
+
+	/**
+	 * according lifecycle state of component get updated component details
+	 * @param chosenLifeCycleState
+	 * @param component
+	 * @return
+	 * @throws Exception
+	 */
+	public Component updateComponentDetailsByLifeCycleState(LifeCycleStatesEnum chosenLifeCycleState, Component component) throws Exception {
+		if(LifeCycleStatesEnum.CHECKOUT.equals(chosenLifeCycleState)){
+			component = AtomicOperationUtils.getComponentObject(component, UserRoleEnum.DESIGNER);
+		}else{		
+			component = getNewerVersionOfComponent(component, chosenLifeCycleState);	
+		}
 		return component;
 	}
 	
 	// Upload artifact via external API + Check auditing for upload operation + Check response of external API
-	public RestResponse uploadArtifactOfRIIncludingValiditionOfAuditAndResponseCode(Component resourceDetails, ComponentInstance componentInstance, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails, Integer expectedResponseCode) throws Exception {
-		RestResponse restResponse = ArtifactRestUtils.externalAPIUploadArtifactOfComponentInstanceOnAsset(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, resourceDetails.getComponentInstances().get(0));
+	public RestResponse uploadArtifactOfRIIncludingValiditionOfAuditAndResponseCode(Component component, ComponentInstance componentInstance, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails, Integer expectedResponseCode) throws Exception {
+		RestResponse restResponse = ArtifactRestUtils.externalAPIUploadArtifactOfComponentInstanceOnAsset(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, component.getComponentInstances().get(0));
 		
 		// Check response of external API
 		Integer responseCode = restResponse.getErrorCode();
@@ -406,18 +408,16 @@
 		Map <AuditingFieldsKeysEnum, String> body = new HashMap<>();
 		body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, componentInstance.getNormalizedName());
 		
-		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((resourceDetails.getComponentType().getValue() + "s").toUpperCase());
-		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, resourceDetails);
+		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((component.getComponentType().getValue() + "s").toUpperCase());
+		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, component);
 		expectedExternalAudit.setRESOURCE_NAME(componentInstance.getNormalizedName());
-		expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + resourceDetails.getUUID() + "/resourceInstances/" + componentInstance.getNormalizedName() + "/artifacts");
+		expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + component.getUUID() + "/resourceInstances/" + componentInstance.getNormalizedName() + "/artifacts");
 		AuditValidationUtils.validateExternalAudit(expectedExternalAudit, AuditingActionEnum.ARTIFACT_UPLOAD_BY_API.getName(), body);
 		
 		return restResponse;
 	}
 	
 	
-	
-	
 	protected Component getComponentWithResourceInstanceInTargetLifeCycleState(LifeCycleStatesEnum lifeCycleStatesEnum, ResourceTypeEnum resourceTypeEnum) throws Exception {
 		Component component;
 		if(resourceTypeEnum == ResourceTypeEnum.VF) {
@@ -426,9 +426,9 @@
 			Component resourceInstanceDetails = getComponentInTargetLifeCycleState(ComponentTypeEnum.RESOURCE.getValue(), UserRoleEnum.DESIGNER, LifeCycleStatesEnum.CERTIFY, null);
 			AtomicOperationUtils.addComponentInstanceToComponentContainer(resourceInstanceDetails, component, UserRoleEnum.DESIGNER, true).left().value();
 			
-			// Add artifact to service if asked for certifcationrequest - must be at least one artifact for the flow
-			if((LifeCycleStatesEnum.CERTIFICATIONREQUEST == lifeCycleStatesEnum) || (LifeCycleStatesEnum.STARTCERTIFICATION == lifeCycleStatesEnum)) {
-			}
+			// Add artifact to service if asked for certification request - must be at least one artifact for the flow
+//			if((LifeCycleStatesEnum.CERTIFICATIONREQUEST == lifeCycleStatesEnum) || (LifeCycleStatesEnum.STARTCERTIFICATION == lifeCycleStatesEnum)) {
+//			}
 			AtomicOperationUtils.uploadArtifactByType(ArtifactTypeEnum.OTHER, component, UserRoleEnum.DESIGNER, true, true).left().value();
 			component = AtomicOperationUtils.changeComponentState(component, UserRoleEnum.DESIGNER, lifeCycleStatesEnum, true).getLeft();
 		} else {
@@ -446,8 +446,8 @@
 	
 	
 	// Upload artifact via external API + Check auditing for upload operation + Check response of external API
-	protected RestResponse uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails, Integer expectedResponseCode) throws Exception {
-		RestResponse restResponse = ArtifactRestUtils.externalAPIUploadArtifactOfTheAsset(resourceDetails, sdncModifierDetails, artifactReqDetails);
+	protected RestResponse uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails, Integer expectedResponseCode) throws Exception {
+		RestResponse restResponse = ArtifactRestUtils.externalAPIUploadArtifactOfTheAsset(component, sdncModifierDetails, artifactReqDetails);
 		
 		// Check response of external API
 		Integer responseCode = restResponse.getErrorCode();
@@ -460,10 +460,10 @@
 		AuditingActionEnum action = AuditingActionEnum.ARTIFACT_UPLOAD_BY_API;
 		
 		Map <AuditingFieldsKeysEnum, String> body = new HashMap<>();
-		body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getName());
+		body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getName());
 		
-		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((resourceDetails.getComponentType().getValue() + "s").toUpperCase());
-		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, resourceDetails);
+		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((component.getComponentType().getValue() + "s").toUpperCase());
+		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, component);
 		AuditValidationUtils.validateExternalAudit(expectedExternalAudit, AuditingActionEnum.ARTIFACT_UPLOAD_BY_API.getName(), body);
 		
 		return restResponse;
@@ -478,7 +478,7 @@
 	// check that this version different for input version
 	// check that this component uniqueID different from input uniqueID
 	// Return: that version
-	protected Component getNewerVersionOfComponent(Component component, LifeCycleStatesEnum lifeCycleStatesEnum) throws Exception {
+	protected synchronized Component getNewerVersionOfComponent(Component component, LifeCycleStatesEnum lifeCycleStatesEnum) throws Exception {
 		Component resourceDetails = null;
 		
 		if((!lifeCycleStatesEnum.equals(LifeCycleStatesEnum.CHECKOUT)) && (!lifeCycleStatesEnum.equals(LifeCycleStatesEnum.STARTCERTIFICATION))) {
@@ -501,7 +501,7 @@
 			System.out.println("Service UniqueID: " + resourceDetails.getUniqueId());
 			
 			// Checking that new version exist + different from old one by unique id
-			Assert.assertNotEquals(resourceVersion, resourceNewVersion, "Expected for diffrent resource version.");
+			Assert.assertNotEquals(resourceVersion, resourceNewVersion, "Expected for different resource version.");
 			Assert.assertNotEquals(resourceUniqueID, resourceNewUniqueID, "Expected that resource will have new unique ID.");
 		} else {
 			if(component.getComponentType().equals(ComponentTypeEnum.SERVICE)) {
@@ -518,13 +518,13 @@
 	
 	
 	// download deployment via external api + check response code for success (200) + get artifactReqDetails and verify payload + verify audit
-	protected RestResponse downloadResourceDeploymentArtifactExternalAPI(Component resourceDetails, ArtifactDefinition artifactDefinition, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails, ComponentTypeEnum componentTypeEnum) throws Exception {
+	protected RestResponse downloadResourceDeploymentArtifactExternalAPI(Component component, ArtifactDefinition artifactDefinition, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails, ComponentTypeEnum componentTypeEnum) throws Exception {
 		RestResponse restResponse;
 		
 		if(componentTypeEnum == ComponentTypeEnum.RESOURCE_INSTANCE) {
-			restResponse = ArtifactRestUtils.getComponentInstanceDeploymentArtifactExternalAPI(resourceDetails.getUUID(), resourceDetails.getComponentInstances().get(0).getNormalizedName(), artifactDefinition.getArtifactUUID(), ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), resourceDetails.getComponentType().toString());
+			restResponse = ArtifactRestUtils.getComponentInstanceDeploymentArtifactExternalAPI(component.getUUID(), component.getComponentInstances().get(0).getNormalizedName(), artifactDefinition.getArtifactUUID(), ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), component.getComponentType().toString());
 		} else {
-			restResponse = ArtifactRestUtils.getResourceDeploymentArtifactExternalAPI(resourceDetails.getUUID(), artifactDefinition.getArtifactUUID(), ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), resourceDetails.getComponentType().toString());
+			restResponse = ArtifactRestUtils.getResourceDeploymentArtifactExternalAPI(component.getUUID(), artifactDefinition.getArtifactUUID(), ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), component.getComponentType().toString());
 		}
 		
 		Integer responseCode = restResponse.getErrorCode();
@@ -532,7 +532,7 @@
 		Assert.assertEquals(responseCode,expectedCode, "Response code is not correct.");
 		
 		
-		// For known artifact/payload - verify payload of downloaded artfaict
+		// For known artifact/payload - verify payload of downloaded artifact
 		if (artifactReqDetails != null) {
 			String response = restResponse.getResponse();
 			String payloadData = artifactReqDetails.getPayload();
@@ -575,8 +575,8 @@
 	}
 	
 	// download deployment via external api + check response code for success (200) + verify audit
-	protected void downloadResourceDeploymentArtifactExternalAPI(Component resourceDetails, ArtifactDefinition artifactDefinition, User sdncModifierDetails) throws Exception {
-		downloadResourceDeploymentArtifactExternalAPI(resourceDetails, artifactDefinition, sdncModifierDetails, null, resourceDetails.getComponentType());
+	protected void downloadResourceDeploymentArtifactExternalAPI(Component component, ArtifactDefinition artifactDefinition, User sdncModifierDetails) throws Exception {
+		downloadResourceDeploymentArtifactExternalAPI(component, artifactDefinition, sdncModifierDetails, null, component.getComponentType());
 	}
 	
 	
@@ -821,13 +821,13 @@
 			
 			{LifeCycleStatesEnum.CHECKOUT, ComponentTypeEnum.RESOURCE, "uploadArtifactWithSameLabel"},
 			{LifeCycleStatesEnum.CHECKOUT, ComponentTypeEnum.SERVICE, "uploadArtifactWithSameLabel"},
-//	DE306360		{LifeCycleStatesEnum.CHECKOUT, ComponentTypeEnum.RESOURCE_INSTANCE, "uploadArtifactWithSameLabel"},
+			{LifeCycleStatesEnum.CHECKOUT, ComponentTypeEnum.RESOURCE_INSTANCE, "uploadArtifactWithSameLabel"},
 			{LifeCycleStatesEnum.CHECKIN, ComponentTypeEnum.RESOURCE, "uploadArtifactWithSameLabel"},
 			{LifeCycleStatesEnum.CHECKIN, ComponentTypeEnum.SERVICE, "uploadArtifactWithSameLabel"},
-//	DE306360		{LifeCycleStatesEnum.CHECKIN, ComponentTypeEnum.RESOURCE_INSTANCE, "uploadArtifactWithSameLabel"},
+			{LifeCycleStatesEnum.CHECKIN, ComponentTypeEnum.RESOURCE_INSTANCE, "uploadArtifactWithSameLabel"},
 			{LifeCycleStatesEnum.CERTIFICATIONREQUEST, ComponentTypeEnum.RESOURCE, "uploadArtifactWithSameLabel"},
 			{LifeCycleStatesEnum.CERTIFICATIONREQUEST, ComponentTypeEnum.SERVICE, "uploadArtifactWithSameLabel"},
-//	DE306360		{LifeCycleStatesEnum.CERTIFICATIONREQUEST, ComponentTypeEnum.RESOURCE_INSTANCE, "uploadArtifactWithSameLabel"},
+			{LifeCycleStatesEnum.CERTIFICATIONREQUEST, ComponentTypeEnum.RESOURCE_INSTANCE, "uploadArtifactWithSameLabel"},
 			
 			{LifeCycleStatesEnum.CHECKOUT, ComponentTypeEnum.RESOURCE, "uploadArtifactWithInvalidCheckSum"},
 			{LifeCycleStatesEnum.CHECKOUT, ComponentTypeEnum.SERVICE, "uploadArtifactWithInvalidCheckSum"},
@@ -902,104 +902,104 @@
 	}
 	
 	// Upload artifact with invalid type via external API - to long type
-	protected void uploadArtifactWithInvalidTypeToLong(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
+	protected void uploadArtifactWithInvalidTypeToLong(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
 			ComponentInstance componentResourceInstanceDetails) throws Exception {
 		artifactReqDetails.setArtifactType("dsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfdsdsfdsfds");
 		ErrorInfo errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.ARTIFACT_TYPE_NOT_SUPPORTED.name());
 		List<String> variables = asList(artifactReqDetails.getArtifactType());
 		
-		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
+		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
 				artifactReqDetails, 400, componentResourceInstanceDetails, errorInfo, variables, null, false);
 	}
 	
 	// Upload artifact with invalid type via external API - empty type
-	protected void uploadArtifactWithInvalidTypeEmpty(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
+	protected void uploadArtifactWithInvalidTypeEmpty(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
 			ComponentInstance componentResourceInstanceDetails) throws Exception {
 		artifactReqDetails.setArtifactType("");
 		ErrorInfo errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.ARTIFACT_TYPE_NOT_SUPPORTED.name());
 		List<String> variables = asList(artifactReqDetails.getArtifactType());
 		
-		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
+		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
 				artifactReqDetails, 400, componentResourceInstanceDetails, errorInfo, variables, null, false);
 	}
 	
 	// Upload artifact with invalid checksum via external API
-	protected void uploadArtifactWithInvalidCheckSum(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
+	protected void uploadArtifactWithInvalidCheckSum(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
 			ComponentInstance componentResourceInstanceDetails) throws Exception {
 		ErrorInfo errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.ARTIFACT_INVALID_MD5.name());
 		List<String> variables = asList();
-		uploadArtifactWithInvalidCheckSumOfAssetIncludingValiditionOfAuditAndResponseCode(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
+		uploadArtifactWithInvalidCheckSumOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
 						artifactReqDetails, 400, componentResourceInstanceDetails, errorInfo, variables);
 	}
 	
 	
 	// Upload artifact with valid type & invalid name via external API - name to long
-	protected void uploadArtifactWithInvalidNameToLong(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
+	protected void uploadArtifactWithInvalidNameToLong(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
 			ComponentInstance componentResourceInstanceDetails) throws Exception {
 		ErrorInfo errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.EXCEEDS_LIMIT.name());
 		List<String> variables = asList("artifact name", "255");
 		artifactReqDetails.setArtifactName("invalGGfdsiofhdsouhfoidshfoidshoifhsdoifhdsouihfdsofhiufdsinvalGGfdsiofhdsouhfoidshfoidshoifhsdoifhdsouihfdsofhiufdsghiufghodhfioudsgafodsgaiofudsghifudsiugfhiufawsouipfhgawseiupfsadiughdfsoiuhgfaighfpasdghfdsaqgfdsgdfgidTypeinvalGGfdsiofhdsouhfoidshfoidshoifhsdoifhdsouihfdsofhiufdsghiufghodhfioudsgafodsgaiofudsghifudsiugfhiufawsouipfhgawseiupfsadiughdfsoiuhgfaighfpasdghfdsaqgfdsgdfgidTypeghiufghodhfioudsgafodsgaiofudsghifudsiugfhiufawsouipfhgawseiupfsadiughdfsoiuhgfaighfpasdghfdsaqgfdsgdfgidType");
-		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
+		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
 						artifactReqDetails, 400, componentResourceInstanceDetails, errorInfo, variables, null, false);
 	}
 	
 	
 	// Upload artifact with valid type & invalid name via external API - name is empty
-	protected void uploadArtifactWithInvalidNameEmpty(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
+	protected void uploadArtifactWithInvalidNameEmpty(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
 			ComponentInstance componentResourceInstanceDetails) throws Exception {
 		ErrorInfo errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.MISSING_ARTIFACT_NAME.name());
 		List<String> variables = asList();
 		
 		artifactReqDetails.setArtifactName("");
-		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
+		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
 				artifactReqDetails, 400, componentResourceInstanceDetails, errorInfo, variables, null, false);
 	}
 	
 	
 	// Upload artifact with valid type & invalid label via external API - label to long
-	protected void uploadArtifactWithInvalidLabelToLong(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
+	protected void uploadArtifactWithInvalidLabelToLong(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
 			ComponentInstance componentResourceInstanceDetails) throws Exception {
 		
 		ErrorInfo errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.EXCEEDS_LIMIT.name());
 		List<String> variables = asList("artifact label", "255");
 		artifactReqDetails.setArtifactLabel("invalGGfdsiofhdsouhfoidshfoidshoifhsdoifhdsouihfdsofhiufdsghiufghodhfioudsgafodsgaiofudsghifudsiugfhiufawsouipfhgawseiupfsadiughdfsoiuhgfaighfpasdghfdsaqgfdsgdfgidTypeinvalGGfdsiofhdsouhfoidshfoidshoifhsdoifhdsouihfdsofhiufdsghiufghodhfioudsgafodsgaiofudsghifudsiugfhiufawsouipfhgawseiupfsadiughdfsoiuhgfaighfpasdghfdsaqgfdsgdfgidTypeinvalGGfdsiofhdsouhfoidshfoidshoifhsdoifhdsouihfdsofhiufdsghiufghodhfioudsgafodsgaiofudsghifudsiugfhiufawsouipfhgawseiupfsadiughdfsoiuhgfaighfpasdghfdsaqgfdsgdfgidTypeinvalGGfdsiofhdsouhfoidshfoidshoifhsdoifhdsouihfdsofhiufdsghiufghodhfioudsgafodsgaiofudsghifudsiugfhiufawsouipfhgawseiupfsadiughdfsoiuhgfaighfpasdghfdsaqgfdsgdfgidType");
-		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
+		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
 				artifactReqDetails, 400, componentResourceInstanceDetails, errorInfo, variables, null, false);
 	}
 		
 		
 	// Upload artifact with valid type & invalid label via external API - label is empty
-	protected void uploadArtifactWithInvalidLabelEmpty(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
+	protected void uploadArtifactWithInvalidLabelEmpty(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
 			ComponentInstance componentResourceInstanceDetails) throws Exception {
 		
 		ErrorInfo errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.MISSING_DATA.name());
 		List<String> variables = asList("artifact label");
 		artifactReqDetails.setArtifactLabel("");
-		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
+		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
 				artifactReqDetails, 400, componentResourceInstanceDetails, errorInfo, variables, null, false);
 	}
 	
 	
 	// Upload artifact with invalid description via external API - to long description
-	protected void uploadArtifactWithInvalidDescriptionToLong(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
+	protected void uploadArtifactWithInvalidDescriptionToLong(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
 			ComponentInstance componentResourceInstanceDetails) throws Exception {
 			
 		ErrorInfo errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.EXCEEDS_LIMIT.name());
 		List<String> variables = asList("artifact description", "256");
 		artifactReqDetails.setDescription("invalGGfdsiofhdsouhfoidshfoidshoifhsdoifhdsouihfdsofhiufdsinvalGGfdsiofhdsouhfoidshfoidshoifhsdoifhdsouihfdsofhiufdsghiufghodhfioudsgafodsgaiofudsghifudsiugfhiufawsouipfhgawseiupfsadiughdfsoiuhgfaighfpasdghfdsaqgfdsgdfgidTypeinvalGGfdsiofhdsouhfoidshfoidshoifhsdoifhdsouihfdsofhiufdsghiufghodhfioudsgafodsgaiofudsghifudsiugfhiufawsouipfhgawseiupfsadiughdfsoiuhgfaighfpasdghfdsaqgfdsgdfgidTypeghiufghodhfioudsgafodsgaiofudsghifudsiugfhiufawsouipfhgawseiupfsadiughdfsoiuhgfaighfpasdghfdsaqgfdsgdfgidType");
-		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
+		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
 				artifactReqDetails, 400, componentResourceInstanceDetails, errorInfo, variables, null, false);
 	}
 			
 			
 	// Upload artifact with invalid description via external API - empty description
-	protected void uploadArtifactWithInvalidDescriptionEmpty(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
+	protected void uploadArtifactWithInvalidDescriptionEmpty(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
 			ComponentInstance componentResourceInstanceDetails) throws Exception {
 			
 		ErrorInfo errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.MISSING_DATA.name());
 		List<String> variables = asList("artifact description");
 		artifactReqDetails.setDescription("");
-		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
+		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
 				artifactReqDetails, 400, componentResourceInstanceDetails, errorInfo, variables, null, false);
 	}
 	
@@ -1007,14 +1007,14 @@
 	
 	
 	// Upload artifact with same label via external API
-	protected void uploadArtifactWithSameLabel(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
+	protected void uploadArtifactWithSameLabel(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
 			ComponentInstance componentResourceInstanceDetails) throws Exception {
 		
 		RestResponse restResponse = null;
 		if(componentResourceInstanceDetails != null) {
-			restResponse = ArtifactRestUtils.externalAPIUploadArtifactOfComponentInstanceOnAsset(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, componentResourceInstanceDetails);
+			restResponse = ArtifactRestUtils.externalAPIUploadArtifactOfComponentInstanceOnAsset(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, componentResourceInstanceDetails);
 		} else {
-			restResponse = ArtifactRestUtils.externalAPIUploadArtifactOfTheAsset(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails);
+			restResponse = ArtifactRestUtils.externalAPIUploadArtifactOfTheAsset(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails);
 
 		}
 		
@@ -1022,18 +1022,18 @@
 		ErrorInfo errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.ARTIFACT_EXIST.name());
 		
 		List<String> variables = asList(artifactDefinition.getArtifactDisplayName());
-		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
+		uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
 				artifactReqDetails, 400, componentResourceInstanceDetails, errorInfo, variables, null, false);
 	}
 	
-	protected RestResponse uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
+	protected RestResponse uploadArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
 			Integer expectedResponseCode, ComponentInstance componentResourceInstanceDetails, ErrorInfo errorInfo, List<String> variables, LifeCycleStatesEnum lifeCycleStatesEnum, Boolean includeResourceNameInAudit) throws Exception {
 		RestResponse restResponse;
 		
 		if(componentResourceInstanceDetails != null) {
-			restResponse = ArtifactRestUtils.externalAPIUploadArtifactOfComponentInstanceOnAsset(resourceDetails, sdncModifierDetails, artifactReqDetails, componentResourceInstanceDetails);
+			restResponse = ArtifactRestUtils.externalAPIUploadArtifactOfComponentInstanceOnAsset(component, sdncModifierDetails, artifactReqDetails, componentResourceInstanceDetails);
 		} else {
-			restResponse = ArtifactRestUtils.externalAPIUploadArtifactOfTheAsset(resourceDetails, sdncModifierDetails, artifactReqDetails);
+			restResponse = ArtifactRestUtils.externalAPIUploadArtifactOfTheAsset(component, sdncModifierDetails, artifactReqDetails);
 
 		}
 		
@@ -1046,30 +1046,30 @@
 				
 		AuditingActionEnum action = AuditingActionEnum.ARTIFACT_UPLOAD_BY_API;
 				
-		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((resourceDetails.getComponentType().getValue() + "s").toUpperCase());
+		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((component.getComponentType().getValue() + "s").toUpperCase());
 //		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, resourceDetails);
 		
 		responseArtifact.setUpdaterFullName("");
 		responseArtifact.setUserIdLastUpdater(sdncModifierDetails.getUserId());
-		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditFailure(assetTypeEnum, action, responseArtifact, resourceDetails.getUUID(), errorInfo, variables);
-		expectedExternalAudit.setRESOURCE_NAME(resourceDetails.getName());
-		expectedExternalAudit.setRESOURCE_TYPE(resourceDetails.getComponentType().getValue());
+		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditFailure(assetTypeEnum, action, responseArtifact, component.getUUID(), errorInfo, variables);
+		expectedExternalAudit.setRESOURCE_NAME(component.getName());
+		expectedExternalAudit.setRESOURCE_TYPE(component.getComponentType().getValue());
 		expectedExternalAudit.setARTIFACT_DATA(null);
 		Map <AuditingFieldsKeysEnum, String> body = new HashMap<>();
 		body.put(AuditingFieldsKeysEnum.AUDIT_STATUS, responseCode.toString());
 		if(componentResourceInstanceDetails != null) {
-			body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getComponentInstances().get(0).getNormalizedName());
-			expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + resourceDetails.getUUID() + "/resourceInstances/" + resourceDetails.getComponentInstances().get(0).getNormalizedName() + "/artifacts");
-			expectedExternalAudit.setRESOURCE_NAME(resourceDetails.getComponentInstances().get(0).getNormalizedName());
+			body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getComponentInstances().get(0).getNormalizedName());
+			expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + component.getUUID() + "/resourceInstances/" + component.getComponentInstances().get(0).getNormalizedName() + "/artifacts");
+			expectedExternalAudit.setRESOURCE_NAME(component.getComponentInstances().get(0).getNormalizedName());
 		} else {
 			if(includeResourceNameInAudit) {
-				body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getName());
+				body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getName());
 			} else {
 				if((lifeCycleStatesEnum == LifeCycleStatesEnum.CHECKIN) || (lifeCycleStatesEnum == LifeCycleStatesEnum.STARTCERTIFICATION)) {
 				expectedExternalAudit.setRESOURCE_NAME("");
 				body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, "");
 				} else {
-					body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getName());
+					body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getName());
 				}
 			}
 		}
@@ -1085,14 +1085,14 @@
 	
 	
 	
-	protected RestResponse uploadArtifactWithInvalidCheckSumOfAssetIncludingValiditionOfAuditAndResponseCode(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
+	protected RestResponse uploadArtifactWithInvalidCheckSumOfAssetIncludingValiditionOfAuditAndResponseCode(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails,
 			Integer expectedResponseCode, ComponentInstance componentResourceInstanceDetails, ErrorInfo errorInfo, List<String> variables) throws Exception {
 		RestResponse restResponse;
 		
 		if(componentResourceInstanceDetails != null) {
-			restResponse = ArtifactRestUtils.externalAPIUploadArtifactWithInvalidCheckSumOfComponentInstanceOnAsset(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, componentResourceInstanceDetails);
+			restResponse = ArtifactRestUtils.externalAPIUploadArtifactWithInvalidCheckSumOfComponentInstanceOnAsset(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, componentResourceInstanceDetails);
 		} else {
-			restResponse = ArtifactRestUtils.externalAPIUploadArtifactWithInvalidCheckSumOfTheAsset(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails);
+			restResponse = ArtifactRestUtils.externalAPIUploadArtifactWithInvalidCheckSumOfTheAsset(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails);
 
 		}
 		
@@ -1109,23 +1109,23 @@
 				
 		AuditingActionEnum action = AuditingActionEnum.ARTIFACT_UPLOAD_BY_API;
 				
-		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((resourceDetails.getComponentType().getValue() + "s").toUpperCase());
+		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((component.getComponentType().getValue() + "s").toUpperCase());
 //		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, resourceDetails);
 		
 		responseArtifact.setUpdaterFullName("");
 		responseArtifact.setUserIdLastUpdater(sdncModifierDetails.getUserId());
-		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditFailure(assetTypeEnum, action, responseArtifact, resourceDetails.getUUID(), errorInfo, variables);
-		expectedExternalAudit.setRESOURCE_NAME(resourceDetails.getName());
-		expectedExternalAudit.setRESOURCE_TYPE(resourceDetails.getComponentType().getValue());
+		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditFailure(assetTypeEnum, action, responseArtifact, component.getUUID(), errorInfo, variables);
+		expectedExternalAudit.setRESOURCE_NAME(component.getName());
+		expectedExternalAudit.setRESOURCE_TYPE(component.getComponentType().getValue());
 		expectedExternalAudit.setARTIFACT_DATA(null);
 		Map <AuditingFieldsKeysEnum, String> body = new HashMap<>();
 		body.put(AuditingFieldsKeysEnum.AUDIT_STATUS, responseCode.toString());
 		if(componentResourceInstanceDetails != null) {
-			body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getComponentInstances().get(0).getNormalizedName());
-			expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + resourceDetails.getUUID() + "/resourceInstances/" + resourceDetails.getComponentInstances().get(0).getNormalizedName() + "/artifacts");
-			expectedExternalAudit.setRESOURCE_NAME(resourceDetails.getComponentInstances().get(0).getNormalizedName());
+			body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getComponentInstances().get(0).getNormalizedName());
+			expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + component.getUUID() + "/resourceInstances/" + component.getComponentInstances().get(0).getNormalizedName() + "/artifacts");
+			expectedExternalAudit.setRESOURCE_NAME(component.getComponentInstances().get(0).getNormalizedName());
 		} else {
-			body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getName());
+			body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getName());
 		}
 		AuditValidationUtils.validateExternalAudit(expectedExternalAudit, AuditingActionEnum.ARTIFACT_UPLOAD_BY_API.getName(), body);
 		
@@ -1542,7 +1542,6 @@
 			};
 	}
 	
-	
 	// Verify that it cannot update VFC/VL/CP artifact on VFCi/VLi/CPi - Failure flow
 	@Test(dataProvider="updateArtifactOfVfcVlCpForVfciVliCpiViaExternalAPI")
 	public void updateArtifactOfVfcVlCpForVfciVliCpiViaExternalAPI(ResourceTypeEnum resourceTypeEnum) throws Exception {
@@ -1571,10 +1570,6 @@
 
 	}
 	
-	
-	
-	
-	
 	@DataProvider(name="updateArtifactOnRIViaExternalAPI", parallel=true) 
 	public static Object[][] dataProviderUpdateArtifactOnRIViaExternalAPI() {
 		return new Object[][] {
@@ -1602,10 +1597,6 @@
 			};
 	}
 	
-	
-	
-	
-	
 	@Test(dataProvider="updateArtifactOnRIViaExternalAPI")
 	public void updateArtifactOnRIViaExternalAPI(LifeCycleStatesEnum chosenLifeCycleState, String artifactType, ResourceTypeEnum resourceTypeEnum) throws Exception {
 		getExtendTest().log(Status.INFO, String.format("chosenLifeCycleState: %s, artifactType: %s", chosenLifeCycleState, artifactType));
@@ -1619,12 +1610,6 @@
 		}
 	}
 	
-	
-	
-	
-	
-	
-	
 	@DataProvider(name="updateArtifactOnVfcVlCpRIViaExternalAPI", parallel=true) 
 	public static Object[][] dataProviderUpdateArtifactOnVfcVlCpRIViaExternalAPI() {
 		return new Object[][] {
@@ -1714,10 +1699,6 @@
 			};
 	}
 	
-	
-	
-	
-	
 	@Test(dataProvider="updateArtifactOnVfcVlCpRIViaExternalAPI")
 	public void updateArtifactOnVfcVlCpRIViaExternalAPI(LifeCycleStatesEnum chosenLifeCycleState, String artifactType, ResourceTypeEnum resourceTypeEnum) throws Exception {
 		getExtendTest().log(Status.INFO, String.format("chosenLifeCycleState: %s, artifactType: %s", chosenLifeCycleState, artifactType));
@@ -1732,15 +1713,6 @@
 		}
 	}
 	
-	
-	
-	
-	
-	
-	
-	
-	
-	
 	@DataProvider(name="updateArtifactOnVFViaExternalAPIByDiffrentUserThenCreatorOfAsset", parallel=true) 
 	public static Object[][] dataProviderUpdateArtifactOnVFViaExternalAPIByDiffrentUserThenCreatorOfAsset() {
 		return new Object[][] {
@@ -1789,8 +1761,6 @@
 			};
 	}
 		
-
-
 	// External API
 	// Update artifact by diffrent user then creator of asset - Fail
 	@Test(dataProvider="updateArtifactOnVFViaExternalAPIByDiffrentUserThenCreatorOfAsset")
@@ -1812,8 +1782,6 @@
 			};
 	}
 		
-
-
 	// External API
 	// Upload artifact on VF via external API - happy flow
 	@Test(dataProvider="updateArtifactOnAssetWhichNotExist")
@@ -1875,7 +1843,6 @@
 			};
 	}
 	
-	
 	@Test(dataProvider="updateArtifactOnAssetWhichInInvalidStateForUploading")
 	public void updateArtifactOnAssetWhichInInvalidStateForUploading(ComponentTypeEnum componentTypeEnum, String artifactType) throws Exception {
 		getExtendTest().log(Status.INFO, String.format("componentTypeEnum: %s, artifactType: %s", componentTypeEnum, artifactType));
@@ -2065,10 +2032,10 @@
 		
 		if(componentInstance != null) {
 			updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					400, component.getComponentInstances().get(0), artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), component.getComponentInstances().get(0), artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
 		} else {
 			updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					400, null, artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), null, artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
 
 		}
 	}
@@ -2100,10 +2067,10 @@
 		
 		if(componentInstance != null) {
 			updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					400, component.getComponentInstances().get(0), artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), component.getComponentInstances().get(0), artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
 		} else {
 			updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					400, null, artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), null, artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
 
 		}
 	}
@@ -2135,10 +2102,10 @@
 
 		if(componentInstance != null) {
 			updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					400, component.getComponentInstances().get(0), artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), component.getComponentInstances().get(0), artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
 		} else {
 			updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					400, null, artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), null, artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
 
 		}
 	}
@@ -2170,10 +2137,10 @@
 		
 		if(componentInstance != null) {
 			updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					400, component.getComponentInstances().get(0), artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), component.getComponentInstances().get(0), artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
 		} else {
 			updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					400, null, artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), null, artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
 
 		}
 	}
@@ -2205,10 +2172,10 @@
 		
 		if(componentInstance != null) {
 			updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					400, component.getComponentInstances().get(0), artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), component.getComponentInstances().get(0), artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
 		} else {
 			updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					400, null, artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), null, artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
 
 		}
 	}
@@ -2241,21 +2208,14 @@
 		
 		if(componentInstance != null) {
 			updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					400, component.getComponentInstances().get(0), artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), component.getComponentInstances().get(0), artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
 		} else {
 			updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					400, null, artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), null, artifactReqDetails, artifactUUID, errorInfo, variables, null, true);
 
 		}
 	}
 	
-
-
-	
-	
-	
-	
-	
 	
 	// Unhappy flow - get chosen life cycle state, artifact type and asset type
 	// update artifact via external API + check audit & response code
@@ -2305,14 +2265,14 @@
 		return component;
 	}
 	
-	protected RestResponse updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(Component resourceDetails, User sdncModifierDetails,
+	protected RestResponse updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(Component component, User sdncModifierDetails,
 			Integer expectedResponseCode, ComponentInstance componentInstance, ArtifactReqDetails artifactReqDetails, String artifactUUID, ErrorInfo errorInfo, List<String> variables, LifeCycleStatesEnum lifeCycleStatesEnum, Boolean resourceNameInAudit) throws Exception {
 		RestResponse restResponse;
 		
 		if(componentInstance != null) {
-			restResponse = ArtifactRestUtils.externalAPIUpdateArtifactOfComponentInstanceOnAsset(resourceDetails, sdncModifierDetails, artifactReqDetails, componentInstance, artifactUUID);
+			restResponse = ArtifactRestUtils.externalAPIUpdateArtifactOfComponentInstanceOnAsset(component, sdncModifierDetails, artifactReqDetails, componentInstance, artifactUUID);
 		} else {
-			restResponse = ArtifactRestUtils.externalAPIUpdateArtifactOfTheAsset(resourceDetails, sdncModifierDetails, artifactReqDetails, artifactUUID);
+			restResponse = ArtifactRestUtils.externalAPIUpdateArtifactOfTheAsset(component, sdncModifierDetails, artifactReqDetails, artifactUUID);
 
 		}
 		
@@ -2326,35 +2286,35 @@
 				
 		AuditingActionEnum action = AuditingActionEnum.ARTIFACT_UPDATE_BY_API;
 				
-		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((resourceDetails.getComponentType().getValue() + "s").toUpperCase());
+		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((component.getComponentType().getValue() + "s").toUpperCase());
 //		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, resourceDetails);
 		
 		responseArtifact.setUpdaterFullName("");
 		responseArtifact.setUserIdLastUpdater(sdncModifierDetails.getUserId());
-		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditFailure(assetTypeEnum, action, responseArtifact, resourceDetails.getUUID(), errorInfo, variables);
-		expectedExternalAudit.setRESOURCE_NAME(resourceDetails.getName());
-		expectedExternalAudit.setRESOURCE_TYPE(resourceDetails.getComponentType().getValue());
+		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditFailure(assetTypeEnum, action, responseArtifact, component.getUUID(), errorInfo, variables);
+		expectedExternalAudit.setRESOURCE_NAME(component.getName());
+		expectedExternalAudit.setRESOURCE_TYPE(component.getComponentType().getValue());
 		expectedExternalAudit.setARTIFACT_DATA("");
 		expectedExternalAudit.setCURR_ARTIFACT_UUID(artifactUUID);
 		Map <AuditingFieldsKeysEnum, String> body = new HashMap<>();
 		body.put(AuditingFieldsKeysEnum.AUDIT_STATUS, responseCode.toString());
 		if(componentInstance != null) {
-			body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getComponentInstances().get(0).getNormalizedName());
-			expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + resourceDetails.getUUID() + "/resourceInstances/" + resourceDetails.getComponentInstances().get(0).getNormalizedName() + "/artifacts/" + artifactUUID);
-			expectedExternalAudit.setRESOURCE_NAME(resourceDetails.getComponentInstances().get(0).getNormalizedName());
+			body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getComponentInstances().get(0).getNormalizedName());
+			expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + component.getUUID() + "/resourceInstances/" + component.getComponentInstances().get(0).getNormalizedName() + "/artifacts/" + artifactUUID);
+			expectedExternalAudit.setRESOURCE_NAME(component.getComponentInstances().get(0).getNormalizedName());
 		} else {
 			expectedExternalAudit.setRESOURCE_URL(expectedExternalAudit.getRESOURCE_URL() + "/" + artifactUUID);
 			if((lifeCycleStatesEnum == LifeCycleStatesEnum.CHECKIN) || (lifeCycleStatesEnum == LifeCycleStatesEnum.STARTCERTIFICATION)) {
 				if(resourceNameInAudit) {
-					expectedExternalAudit.setRESOURCE_NAME(resourceDetails.getName());
-					body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getName());
+					expectedExternalAudit.setRESOURCE_NAME(component.getName());
+					body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getName());
 				} else {
 					body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_URL, expectedExternalAudit.getRESOURCE_URL());
 //					body.put(AuditingFieldsKeysEnum.AUDIT_CURR_ARTIFACT_UUID, artifactUUID);
 					expectedExternalAudit.setRESOURCE_NAME("");
 				}			
 			} else {
-				body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getName());
+				body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getName());
 			}
 		}
 			
@@ -2381,7 +2341,7 @@
 		return downloadResourceDeploymentArtifactExternalAPI(component, component.getDeploymentArtifacts().get(artifactName), sdncModifierDetails, artifactReqDetails, componentTypeEnum);
 	}
 	
-	// Get deployment artifact of asset
+	// Get deployment artifact of RI
 	protected Map<String, ArtifactDefinition> getDeploymentArtifactsOfAsset(Component component, ComponentTypeEnum componentTypeEnum) {
 		Map<String, ArtifactDefinition> deploymentArtifacts = null;
 		if(ComponentTypeEnum.RESOURCE_INSTANCE == componentTypeEnum) {
@@ -2447,20 +2407,13 @@
 		deploymentArtifacts = getDeploymentArtifactsOfAsset(component, componentTypeEnum);
 		numberOfArtifact = deploymentArtifacts.size();
 		
-		
 		// create component/s & upload artifact via external api
 		if(ComponentTypeEnum.RESOURCE_INSTANCE == componentTypeEnum) {
-			if((chosenLifeCycleState == LifeCycleStatesEnum.CERTIFICATIONREQUEST) && (!component.getComponentType().toString().equals(ComponentTypeEnum.RESOURCE.toString()))) {
-				numberOfArtifact = numberOfArtifact - 1;
-			}
  			restResponse = updateArtifactOfRIIncludingValiditionOfAuditAndResponseCode(component, component.getComponentInstances().get(0), ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, artifactUUID, 200);
 		} else {
-			
 			restResponse = updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, artifactUUID, 200);
 		}
 			
-			
-			
 		ArtifactDefinition responseArtifact = getArtifactDataFromJson(restResponse.getResponse());
 		component = getNewerVersionOfComponent(component, chosenLifeCycleState);
 			
@@ -2483,8 +2436,8 @@
 	
 	
 	// Update artifact via external API + Check auditing for upload operation + Check response of external API
-	protected RestResponse updateArtifactOfRIIncludingValiditionOfAuditAndResponseCode(Component resourceDetails, ComponentInstance componentInstance, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails, String artifactUUID, Integer expectedResponseCode) throws Exception {
-		RestResponse restResponse = ArtifactRestUtils.externalAPIUpdateArtifactOfComponentInstanceOnAsset(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, resourceDetails.getComponentInstances().get(0), artifactUUID);
+	protected RestResponse updateArtifactOfRIIncludingValiditionOfAuditAndResponseCode(Component component, ComponentInstance componentInstance, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails, String artifactUUID, Integer expectedResponseCode) throws Exception {
+		RestResponse restResponse = ArtifactRestUtils.externalAPIUpdateArtifactOfComponentInstanceOnAsset(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, component.getComponentInstances().get(0), artifactUUID);
 		
 		// Check response of external API
 		Integer responseCode = restResponse.getErrorCode();
@@ -2499,11 +2452,11 @@
 		Map <AuditingFieldsKeysEnum, String> body = new HashMap<>();
 		body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, componentInstance.getNormalizedName());
 		
-		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((resourceDetails.getComponentType().getValue() + "s").toUpperCase());
-		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, resourceDetails);
+		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((component.getComponentType().getValue() + "s").toUpperCase());
+		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, component);
 //		expectedExternalAudit.setRESOURCE_URL(expectedExternalAudit.getRESOURCE_URL()+ "/" + artifactUUID);
 		expectedExternalAudit.setRESOURCE_NAME(componentInstance.getNormalizedName());
-		expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + resourceDetails.getUUID() + "/resourceInstances/" + componentInstance.getNormalizedName() + "/artifacts/" + artifactUUID);
+		expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + component.getUUID() + "/resourceInstances/" + componentInstance.getNormalizedName() + "/artifacts/" + artifactUUID);
 		AuditValidationUtils.validateExternalAudit(expectedExternalAudit, AuditingActionEnum.ARTIFACT_UPDATE_BY_API.getName(), body);
 		
 		return restResponse;
@@ -2511,8 +2464,8 @@
 	
 	
 	// Update artifact via external API + Check auditing for upload operation + Check response of external API
-	protected RestResponse updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(Component resourceDetails, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails, String artifactUUID, Integer expectedResponseCode) throws Exception {
-		RestResponse restResponse = ArtifactRestUtils.externalAPIUpdateArtifactOfTheAsset(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, artifactUUID);
+	protected RestResponse updateArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(Component component, User sdncModifierDetails, ArtifactReqDetails artifactReqDetails, String artifactUUID, Integer expectedResponseCode) throws Exception {
+		RestResponse restResponse = ArtifactRestUtils.externalAPIUpdateArtifactOfTheAsset(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactReqDetails, artifactUUID);
 		
 		// Check response of external API
 		Integer responseCode = restResponse.getErrorCode();
@@ -2525,10 +2478,10 @@
 		AuditingActionEnum action = AuditingActionEnum.ARTIFACT_UPDATE_BY_API;
 		
 		Map <AuditingFieldsKeysEnum, String> body = new HashMap<>();
-		body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getName());
+		body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getName());
 		
-		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((resourceDetails.getComponentType().getValue() + "s").toUpperCase());
-		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, resourceDetails);
+		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((component.getComponentType().getValue() + "s").toUpperCase());
+		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, component);
 		expectedExternalAudit.setRESOURCE_URL(expectedExternalAudit.getRESOURCE_URL()+ "/" + artifactUUID);
 		AuditValidationUtils.validateExternalAudit(expectedExternalAudit, AuditingActionEnum.ARTIFACT_UPDATE_BY_API.getName(), body);
 		
@@ -2571,9 +2524,6 @@
 			};
 	}
 	
-	
-	
-	
 	// Delete artifact for Service - Success
 	@Test(dataProvider="deleteArtifactForServiceViaExternalAPI")
 	public void deleteArtifactForServiceViaExternalAPI(LifeCycleStatesEnum lifeCycleStatesEnum, String artifactType) throws Exception {
@@ -2935,7 +2885,7 @@
 		
 
 	// External API
-	// Delete artifact by diffrent user then creator of asset - Fail
+	// Delete artifact by different user then creator of asset - Fail
 	@Test(dataProvider="deleteArtifactOnVFViaExternalAPIByDiffrentUserThenCreatorOfAsset")
 	public void deleteArtifactOnVFViaExternalAPIByDiffrentUserThenCreatorOfAsset(ComponentTypeEnum componentTypeEnum, UserRoleEnum userRoleEnum, LifeCycleStatesEnum lifeCycleStatesEnum, String artifactType) throws Exception {
 		getExtendTest().log(Status.INFO, String.format("componentTypeEnum: %s, userRoleEnum %s, lifeCycleStatesEnum %s, artifactType: %s", componentTypeEnum, userRoleEnum, lifeCycleStatesEnum, artifactType));
@@ -2955,10 +2905,10 @@
 		
 		if(componentTypeEnum.equals(ComponentTypeEnum.RESOURCE_INSTANCE)) {
 			deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(userRoleEnum),
-					409, component.getComponentInstances().get(0), artifactUUID, errorInfo, variables, lifeCycleStatesEnum, true);
+					errorInfo.getCode(), component.getComponentInstances().get(0), artifactUUID, errorInfo, variables, lifeCycleStatesEnum, true);
 		} else {
 			deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(userRoleEnum),
-					409, null, artifactUUID, errorInfo, variables, lifeCycleStatesEnum, true);
+					errorInfo.getCode(), null, artifactUUID, errorInfo, variables, lifeCycleStatesEnum, true);
 		}
 			
 		//TODO
@@ -3000,10 +2950,10 @@
 		
 		if(componentTypeEnum.equals(ComponentTypeEnum.RESOURCE_INSTANCE)) {
 			deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					404, component.getComponentInstances().get(0), invalidArtifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), component.getComponentInstances().get(0), invalidArtifactUUID, errorInfo, variables, null, true);
 		} else {
 			deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					404, null, invalidArtifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), null, invalidArtifactUUID, errorInfo, variables, null, true);
 
 		}
 		
@@ -3014,7 +2964,7 @@
 			errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.COMPONENT_INSTANCE_NOT_FOUND_ON_CONTAINER.name());
 			variables = asList("invalidNormalizedName", ComponentTypeEnum.RESOURCE_INSTANCE.getValue().toLowerCase(), ComponentTypeEnum.SERVICE.getValue(), component.getName());
 			deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					404, component.getComponentInstances().get(0), artifactUUID, errorInfo, variables, LifeCycleStatesEnum.CHECKIN, true);
+					errorInfo.getCode(), component.getComponentInstances().get(0), artifactUUID, errorInfo, variables, LifeCycleStatesEnum.CHECKIN, true);
 		} else {
 			component.setUUID("invalidComponentUUID");
 			if(componentTypeEnum.equals(ComponentTypeEnum.RESOURCE)) {
@@ -3024,7 +2974,7 @@
 			}
 			variables = asList("invalidComponentUUID");
 			deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					404, null, artifactUUID, errorInfo, variables, LifeCycleStatesEnum.CHECKIN, false);
+					errorInfo.getCode(), null, artifactUUID, errorInfo, variables, LifeCycleStatesEnum.CHECKIN, false);
 		}
 		
 		
@@ -3065,10 +3015,10 @@
 		
 		if(componentTypeEnum.equals(ComponentTypeEnum.RESOURCE_INSTANCE)) {
 			deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					403, component.getComponentInstances().get(0), artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), component.getComponentInstances().get(0), artifactUUID, errorInfo, variables, null, true);
 		} else {
 			deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-					403, null, artifactUUID, errorInfo, variables, null, true);
+					errorInfo.getCode(), null, artifactUUID, errorInfo, variables, null, true);
 
 		}
 		
@@ -3110,17 +3060,17 @@
 		}
 		List<String> variables = asList(artifactUUID);
 		deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER),
-				404, component.getComponentInstances().get(0), artifactUUID, errorInfo, variables, null, true);
+				errorInfo.getCode(), component.getComponentInstances().get(0), artifactUUID, errorInfo, variables, null, true);
 	}
 	
-	protected RestResponse deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(Component resourceDetails, User sdncModifierDetails,
+	protected RestResponse deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(Component component, User sdncModifierDetails,
 			Integer expectedResponseCode, ComponentInstance componentInstance, String artifactUUID, ErrorInfo errorInfo, List<String> variables, LifeCycleStatesEnum lifeCycleStatesEnum, Boolean resourceNameInAudit) throws Exception {
 		RestResponse restResponse;
 		
 		if(componentInstance != null) {
-			restResponse = ArtifactRestUtils.externalAPIDeleteArtifactOfComponentInstanceOnAsset(resourceDetails, sdncModifierDetails, componentInstance, artifactUUID);
+			restResponse = ArtifactRestUtils.externalAPIDeleteArtifactOfComponentInstanceOnAsset(component, sdncModifierDetails, componentInstance, artifactUUID);
 		} else {
-			restResponse = ArtifactRestUtils.externalAPIDeleteArtifactOfTheAsset(resourceDetails, sdncModifierDetails, artifactUUID);
+			restResponse = ArtifactRestUtils.externalAPIDeleteArtifactOfTheAsset(component, sdncModifierDetails, artifactUUID);
 
 		}
 		
@@ -3133,37 +3083,37 @@
 				
 		AuditingActionEnum action = AuditingActionEnum.ARTIFACT_DELETE_BY_API;
 				
-		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((resourceDetails.getComponentType().getValue() + "s").toUpperCase());
+		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((component.getComponentType().getValue() + "s").toUpperCase());
 //		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, resourceDetails);
 		
 		responseArtifact.setUpdaterFullName("");
 		responseArtifact.setUserIdLastUpdater(sdncModifierDetails.getUserId());
-		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditFailure(assetTypeEnum, action, responseArtifact, resourceDetails.getUUID(), errorInfo, variables);
-		expectedExternalAudit.setRESOURCE_NAME(resourceDetails.getName());
-		expectedExternalAudit.setRESOURCE_TYPE(resourceDetails.getComponentType().getValue());
+		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditFailure(assetTypeEnum, action, responseArtifact, component.getUUID(), errorInfo, variables);
+		expectedExternalAudit.setRESOURCE_NAME(component.getName());
+		expectedExternalAudit.setRESOURCE_TYPE(component.getComponentType().getValue());
 		expectedExternalAudit.setARTIFACT_DATA(null);
 		expectedExternalAudit.setCURR_ARTIFACT_UUID(artifactUUID);
 		Map <AuditingFieldsKeysEnum, String> body = new HashMap<>();
 		body.put(AuditingFieldsKeysEnum.AUDIT_STATUS, responseCode.toString());
 		if(componentInstance != null) {
-			body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getComponentInstances().get(0).getNormalizedName());
-			expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + resourceDetails.getUUID() + "/resourceInstances/" + resourceDetails.getComponentInstances().get(0).getNormalizedName() + "/artifacts/" + artifactUUID);
-			expectedExternalAudit.setRESOURCE_NAME(resourceDetails.getComponentInstances().get(0).getNormalizedName());
+			body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getComponentInstances().get(0).getNormalizedName());
+			expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + component.getUUID() + "/resourceInstances/" + component.getComponentInstances().get(0).getNormalizedName() + "/artifacts/" + artifactUUID);
+			expectedExternalAudit.setRESOURCE_NAME(component.getComponentInstances().get(0).getNormalizedName());
 		} else {
 			expectedExternalAudit.setRESOURCE_URL(expectedExternalAudit.getRESOURCE_URL() + "/" + artifactUUID);
 			if((errorInfo.getMessageId().equals(ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.RESOURCE_NOT_FOUND.name()).getMessageId())) || 
 					errorInfo.getMessageId().equals(ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.COMPONENT_IN_CERT_IN_PROGRESS_STATE.name()).getMessageId()) ||
 					(lifeCycleStatesEnum == LifeCycleStatesEnum.STARTCERTIFICATION)) {
 				if(resourceNameInAudit) {
-					expectedExternalAudit.setRESOURCE_NAME(resourceDetails.getName());
-					body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getName());
+					expectedExternalAudit.setRESOURCE_NAME(component.getName());
+					body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getName());
 				} else {
 					expectedExternalAudit.setRESOURCE_NAME("");
 					body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_URL, expectedExternalAudit.getRESOURCE_URL());
 				}
 			} else {
 				if(resourceNameInAudit) {
-					body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getName());
+					body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getName());
 				} else {
 					expectedExternalAudit.setRESOURCE_NAME("");
 					body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_URL, expectedExternalAudit.getRESOURCE_URL());
@@ -3185,7 +3135,11 @@
 	protected Component deleteArtifactOnAssetViaExternalAPI(Component component, ComponentTypeEnum componentTypeEnum, LifeCycleStatesEnum chosenLifeCycleState) throws Exception {
 		String artifactName = null;
 		component = AtomicOperationUtils.changeComponentState(component, UserRoleEnum.DESIGNER, chosenLifeCycleState, true).getLeft();
-			
+		if(!LifeCycleStatesEnum.CHECKOUT.equals(chosenLifeCycleState)){
+			component = AtomicOperationUtils.getComponentObject(component, UserRoleEnum.DESIGNER);
+		}else{		
+			component = getNewerVersionOfComponent(component, chosenLifeCycleState);	
+		}
 		// get updated artifact data
 		String artifactUUID = null;
 		int moduleTypeArtifact = 0;
@@ -3202,12 +3156,9 @@
 				break;
 			}
 		}
-			
 		
 		String componentVersionBeforeDelete = component.getVersion();
 		int numberOfArtifact = deploymentArtifacts.size();
-		
-			
 				
 		// create component/s & upload artifact via external api
 		if(ComponentTypeEnum.RESOURCE_INSTANCE == componentTypeEnum) {
@@ -3215,8 +3166,8 @@
 		} else {
 			deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactUUID, 200);
 		}	
-				
-		component = getNewerVersionOfComponent(component, chosenLifeCycleState);
+		
+		component = updateComponentDetailsByLifeCycleState(chosenLifeCycleState, component);
 			
 		// Get list of deployment artifact + download them via external API
 		deploymentArtifacts = getDeploymentArtifactsOfAsset(component, componentTypeEnum);
@@ -3228,7 +3179,6 @@
 		} else {
 			Assert.assertEquals(numberOfArtifact - 1, deploymentArtifacts.keySet().size(), "Expected that number of deployment artifact will decrease by one.");
 		}
-		
 
 		if(chosenLifeCycleState == LifeCycleStatesEnum.CHECKOUT) {
 			Assert.assertEquals(componentVersionBeforeDelete, component.getVersion(), "Expected that check-out component will not change version number.");
@@ -3242,8 +3192,8 @@
 	}
 	
 	// Delete artifact via external API + Check auditing for upload operation + Check response of external API
-	protected RestResponse deleteArtifactOfRIIncludingValiditionOfAuditAndResponseCode(Component resourceDetails, ComponentInstance componentInstance, User sdncModifierDetails, String artifactUUID, Integer expectedResponseCode) throws Exception {
-		RestResponse restResponse = ArtifactRestUtils.externalAPIDeleteArtifactOfComponentInstanceOnAsset(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), resourceDetails.getComponentInstances().get(0), artifactUUID);
+	protected RestResponse deleteArtifactOfRIIncludingValiditionOfAuditAndResponseCode(Component component, ComponentInstance componentInstance, User sdncModifierDetails, String artifactUUID, Integer expectedResponseCode) throws Exception {
+		RestResponse restResponse = ArtifactRestUtils.externalAPIDeleteArtifactOfComponentInstanceOnAsset(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), component.getComponentInstances().get(0), artifactUUID);
 		
 		// Check response of external API
 		Integer responseCode = restResponse.getErrorCode();
@@ -3258,20 +3208,20 @@
 		Map <AuditingFieldsKeysEnum, String> body = new HashMap<>();
 		body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, componentInstance.getNormalizedName());
 		
-		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((resourceDetails.getComponentType().getValue() + "s").toUpperCase());
-		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, resourceDetails);
+		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((component.getComponentType().getValue() + "s").toUpperCase());
+		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, component);
 //		expectedExternalAudit.setRESOURCE_URL(expectedExternalAudit.getRESOURCE_URL()+ "/" + artifactUUID);
 		expectedExternalAudit.setRESOURCE_NAME(componentInstance.getNormalizedName());
-		expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + resourceDetails.getUUID() + "/resourceInstances/" + componentInstance.getNormalizedName() + "/artifacts/" + artifactUUID);
+		expectedExternalAudit.setRESOURCE_URL("/sdc/v1/catalog/" + assetTypeEnum.getValue() + "/" + component.getUUID() + "/resourceInstances/" + componentInstance.getNormalizedName() + "/artifacts/" + artifactUUID);
 		AuditValidationUtils.validateExternalAudit(expectedExternalAudit, AuditingActionEnum.ARTIFACT_DELETE_BY_API.getName(), body);
-		
+		component = AtomicOperationUtils.getComponentObject(component, UserRoleEnum.DESIGNER);
 		return restResponse;
 	}
 	
 	
 	// Delete artifact via external API + Check auditing for upload operation + Check response of external API
-	protected RestResponse deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(Component resourceDetails, User sdncModifierDetails, String artifactUUID, Integer expectedResponseCode) throws Exception {
-		RestResponse restResponse = ArtifactRestUtils.externalAPIDeleteArtifactOfTheAsset(resourceDetails, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactUUID);
+	protected RestResponse deleteArtifactOfAssetIncludingValiditionOfAuditAndResponseCode(Component component, User sdncModifierDetails, String artifactUUID, Integer expectedResponseCode) throws Exception {
+		RestResponse restResponse = ArtifactRestUtils.externalAPIDeleteArtifactOfTheAsset(component, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), artifactUUID);
 		
 		// Check response of external API
 		Integer responseCode = restResponse.getErrorCode();
@@ -3284,26 +3234,26 @@
 		AuditingActionEnum action = AuditingActionEnum.ARTIFACT_DELETE_BY_API;
 		
 		Map <AuditingFieldsKeysEnum, String> body = new HashMap<>();
-		body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, resourceDetails.getName());
+		body.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, component.getName());
 		
-		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((resourceDetails.getComponentType().getValue() + "s").toUpperCase());
-		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, resourceDetails);
+		AssetTypeEnum assetTypeEnum = AssetTypeEnum.valueOf((component.getComponentType().getValue() + "s").toUpperCase());
+		ExpectedExternalAudit expectedExternalAudit = ElementFactory.getDefaultExternalArtifactAuditSuccess(assetTypeEnum, action, responseArtifact, component);
 		expectedExternalAudit.setRESOURCE_URL(expectedExternalAudit.getRESOURCE_URL()+ "/" + artifactUUID);
 		AuditValidationUtils.validateExternalAudit(expectedExternalAudit, AuditingActionEnum.ARTIFACT_DELETE_BY_API.getName(), body);
-		
+		component = AtomicOperationUtils.getComponentObject(component, UserRoleEnum.DESIGNER); 
 		return restResponse;
 	}
 	
 	
 	
 	// download deployment via external api + check response code for success (200) + get artifactReqDetails and verify payload + verify audit
-	protected RestResponse downloadResourceDeploymentArtifactExternalAPI(Component resourceDetails, User sdncModifierDetails, String artifactUUID, ComponentTypeEnum componentTypeEnum) throws Exception {
+	protected RestResponse downloadResourceDeploymentArtifactExternalAPI(Component component, User sdncModifierDetails, String artifactUUID, ComponentTypeEnum componentTypeEnum) throws Exception {
 		RestResponse restResponse;
 		
 		if(componentTypeEnum == ComponentTypeEnum.RESOURCE_INSTANCE) {
-			restResponse = ArtifactRestUtils.getComponentInstanceDeploymentArtifactExternalAPI(resourceDetails.getUUID(), resourceDetails.getComponentInstances().get(0).getNormalizedName(), artifactUUID, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), resourceDetails.getComponentType().toString());
+			restResponse = ArtifactRestUtils.getComponentInstanceDeploymentArtifactExternalAPI(component.getUUID(), component.getComponentInstances().get(0).getNormalizedName(), artifactUUID, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), component.getComponentType().toString());
 		} else {
-			restResponse = ArtifactRestUtils.getResourceDeploymentArtifactExternalAPI(resourceDetails.getUUID(), artifactUUID, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), resourceDetails.getComponentType().toString());
+			restResponse = ArtifactRestUtils.getResourceDeploymentArtifactExternalAPI(component.getUUID(), artifactUUID, ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER), component.getComponentType().toString());
 		}
 		
 		Integer responseCode = restResponse.getErrorCode();
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/GetCSARofVF.java b/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/GetCSARofVF.java
index 6acc54b..9d56316 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/GetCSARofVF.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/GetCSARofVF.java
@@ -20,11 +20,10 @@
 
 package org.openecomp.sdc.externalApis;
 
-import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
 
 import java.io.File;
 import java.io.IOException;
-import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -34,58 +33,27 @@
 import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
 
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.io.IOUtils;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.codehaus.jackson.map.ObjectMapper;
 import org.junit.Rule;
 import org.junit.rules.TestName;
-import org.openecomp.sdc.be.datatypes.elements.ConsumerDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.AssetTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
-import org.openecomp.sdc.be.model.ArtifactUiDownloadData;
 import org.openecomp.sdc.be.model.Component;
 import org.openecomp.sdc.be.model.Resource;
 import org.openecomp.sdc.be.model.Service;
-import org.openecomp.sdc.be.model.User;
 import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
 import org.openecomp.sdc.ci.tests.api.ComponentBaseTest;
-import org.openecomp.sdc.ci.tests.api.Urls;
-import org.openecomp.sdc.ci.tests.datatypes.ArtifactReqDetails;
-import org.openecomp.sdc.ci.tests.datatypes.ResourceAssetStructure;
-import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails;
-import org.openecomp.sdc.ci.tests.datatypes.ServiceAssetStructure;
-import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails;
 import org.openecomp.sdc.ci.tests.datatypes.enums.ArtifactTypeEnum;
 import org.openecomp.sdc.ci.tests.datatypes.enums.LifeCycleStatesEnum;
 import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum;
 import org.openecomp.sdc.ci.tests.datatypes.expected.ExpectedExternalAudit;
-import org.openecomp.sdc.ci.tests.datatypes.http.HttpHeaderEnum;
-import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse;
-import org.openecomp.sdc.ci.tests.utils.Utils;
-import org.openecomp.sdc.ci.tests.utils.cassandra.CassandraUtils;
 import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils;
 import org.openecomp.sdc.ci.tests.utils.general.ElementFactory;
-import org.openecomp.sdc.ci.tests.utils.rest.ArtifactRestUtils;
 import org.openecomp.sdc.ci.tests.utils.rest.AssetRestUtils;
-import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils;
-import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils;
-import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser;
-import org.openecomp.sdc.ci.tests.utils.rest.ServiceRestUtils;
 import org.openecomp.sdc.ci.tests.utils.validation.AuditValidationUtils;
-import org.openecomp.sdc.common.api.Constants;
 import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
-import static org.testng.AssertJUnit.assertTrue;
-
-import com.google.gson.Gson;
-
-import fj.data.Either;
 
 public class GetCSARofVF extends ComponentBaseTest {
 
@@ -224,22 +192,42 @@
 		
 	}
 	
-	
 
-	
-	
-
+	/**
+	 * all files in list(expectedDefinitionFolderFileList) must be found in csar file 
+	 * @param resource
+	 * @param toscaModelCsarFile
+	 * @throws ZipException
+	 * @throws IOException
+	 */
 	public void validateCsarContent(Component resource, File toscaModelCsarFile) throws ZipException, IOException {
 		ZipFile zipFile = new ZipFile(toscaModelCsarFile);
+		List<String> expectedDefinitionFolderFileList = new ArrayList<String>();
+		expectedDefinitionFolderFileList.add("Definitions/"+ resource.getComponentType().getValue().toLowerCase()+"-"+ resource.getSystemName()+"-template.yml");
+		expectedDefinitionFolderFileList.add("Definitions/"+ resource.getComponentType().getValue().toLowerCase()+"-"+ resource.getSystemName()+"-template-interface.yml");
+		expectedDefinitionFolderFileList.add("Definitions/relationships.yml");
+		expectedDefinitionFolderFileList.add("Definitions/policies.yml");
+		expectedDefinitionFolderFileList.add("Definitions/nodes.yml");
+		expectedDefinitionFolderFileList.add("Definitions/interfaces.yml");
+		expectedDefinitionFolderFileList.add("Definitions/groups.yml");
+		expectedDefinitionFolderFileList.add("Definitions/data.yml");
+		expectedDefinitionFolderFileList.add("Definitions/capabilities.yml");
+		expectedDefinitionFolderFileList.add("Definitions/artifacts.yml");
+		
 		Enumeration<? extends ZipEntry> entries = zipFile.entries();
 		while(entries.hasMoreElements()){
 			ZipEntry nextElement = entries.nextElement();
 			if (!(nextElement.getName().contains("Artifacts")||nextElement.getName().contains("csar.meta"))){
-				assertTrue("missing file in csar template", (nextElement.getName().equals("TOSCA-Metadata/TOSCA.meta") || 
-						nextElement.getName().equals("Definitions/"+ resource.getComponentType().getValue().toLowerCase()+"-"+ resource.getSystemName()+"-template.yml")) ||
-						nextElement.getName().equals("Definitions/"+ resource.getComponentType().getValue().toLowerCase()+"-"+ resource.getSystemName()+"-template-interface.yml"));
+//				assertTrue("missing file in csar template", (nextElement.getName().equals("TOSCA-Metadata/TOSCA.meta") || 
+//						nextElement.getName().equals("Definitions/"+ resource.getComponentType().getValue().toLowerCase()+"-"+ resource.getSystemName()+"-template.yml")) ||
+//						nextElement.getName().equals("Definitions/"+ resource.getComponentType().getValue().toLowerCase()+"-"+ resource.getSystemName()+"-template-interface.yml"));
+				if(expectedDefinitionFolderFileList.contains(nextElement.getName())){
+					expectedDefinitionFolderFileList.remove(nextElement.getName());
 				}
 			}
+		}
+		zipFile.close();
+		assertTrue("missing files in csar template definitions folder", expectedDefinitionFolderFileList.size() == 0);
 	}
 	
 	public void validateAudit(Component resource) throws Exception {
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/VFCMTExternalAPI.java b/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/VFCMTExternalAPI.java
index f939585..6e212d3 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/VFCMTExternalAPI.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/externalApis/VFCMTExternalAPI.java
@@ -216,10 +216,10 @@
 	// Various failure flows
 	@Test(dataProvider="createVfcmtVariousFailureFlows")
 	public void createVfcmtVariousFailureFlows(String flow) throws Exception {
-		
+		//TODO: check what happens now, test will prbably fail
 		if(flow.equals("resource_type_missing") || flow.equals("resource_type_invalid")) {
 			throw new SkipException("TC require repairs");			
-		}	
+		}
 		
 		User defaultUser = ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER);
 		ResourceExternalReqDetails defaultResource = ElementFactory.getDefaultResourceByType("ci", ResourceCategoryEnum.TEMPLATE_MONITORING_TEMPLATE, defaultUser.getUserId(), ResourceTypeEnum.VFCMT.toString());
@@ -272,21 +272,21 @@
 		case "description_with_invalid_char":
 			defaultResource.setDescription("\uC2B5");
 			expectedResourceAuditJavaObject.setDesc("t");
-			errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.COMPONENT_INVALID_DESCRIPTION.name());
+			errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.INVALID_RESOURCE_TYPE.name());
 			variables = asList(ComponentTypeEnum.RESOURCE.getValue());
 			break;
 		// TODO: defect on the flow - need to get error instead create VFC
 		case "resource_type_missing":
 			defaultResource.setResourceType("");
 			expectedResourceAuditJavaObject.setResourceType("");
-			errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.COMPONENT_MISSING_DESCRIPTION.name());
+			errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.INVALID_CONTENT.name());
 			variables = asList(ComponentTypeEnum.RESOURCE.getValue());
 			break;
 		// TODO: in audit RESOURCE_NAME is empty
 		case "resource_type_invalid":
 			defaultResource.setResourceType("invalid");
 			expectedResourceAuditJavaObject.setResourceType(ComponentTypeEnum.RESOURCE.getValue());
-			errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.INVALID_CONTENT.name());
+			errorInfo = ErrorValidationUtils.parseErrorConfigYaml(ActionStatus.INVALID_RESOURCE_TYPE.name());
 			variables = asList(ComponentTypeEnum.RESOURCE.getValue());
 			break;
 		case "category_type_missing":
@@ -377,7 +377,7 @@
 		// create vfcmt
 		RestResponse restResponse = ResourceRestUtilsExternalAPI.createResource(defaultResource, defaultUser);
 		
-		expectedResourceAuditJavaObject.setStatus("400");
+		expectedResourceAuditJavaObject.setStatus(errorInfo.getCode().toString());
 		expectedResourceAuditJavaObject.setDesc(AuditValidationUtils.buildAuditDescription(errorInfo, variables));
 		AuditValidationUtils.validateAuditExternalCreateResource(expectedResourceAuditJavaObject, action.getName(), body);
 		
diff --git a/test-apis-ci/src/main/resources/ci/conf/attsdc.yaml b/test-apis-ci/src/main/resources/ci/conf/attsdc.yaml
index 7273344..10402eb 100644
--- a/test-apis-ci/src/main/resources/ci/conf/attsdc.yaml
+++ b/test-apis-ci/src/main/resources/ci/conf/attsdc.yaml
@@ -1,6 +1,6 @@
 outputFolder: target
 reportName: index.html
-catalogBeHost: behost
+catalogBeHost: localhost
 catalogFeHost: fehost
 esHost: eshost
 disributionClientHost: disClient
diff --git a/test-apis-ci/src/test/resources/CI/error-configuration.yaml b/test-apis-ci/src/test/resources/CI/error-configuration.yaml
index ef7a885..899a225 100644
--- a/test-apis-ci/src/test/resources/CI/error-configuration.yaml
+++ b/test-apis-ci/src/test/resources/CI/error-configuration.yaml
@@ -1776,3 +1776,9 @@
         message: "Creation of %1 failed. Generic type %2 was not found",
         messageId: "SVC4660"
     }
+    #---------SVC4669-----------------------------
+    INVALID_RESOURCE_TYPE: {
+        code: 400,
+        message: "Error: Invalid resource type.",
+        messageId: "SVC4669"
+    }
\ No newline at end of file
