X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=catalog-be%2Fsrc%2Ftest%2Fjava%2Forg%2Fopenecomp%2Fsdc%2Fbe%2Fcomponents%2Fimpl%2FServiceImportBusinessLogicTest.java;h=47be73a423e0262a9a83839910dfcf28a2c8e06f;hb=8d59b022d1b35a4549ff4a1f3aeea0c11214c6fb;hp=e4b6dd4021f39950305daf760c2551c74130752c;hpb=3935993a90fe768585ab5e908d6334567c1823de;p=sdc.git diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java index e4b6dd4021..47be73a423 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java @@ -27,6 +27,7 @@ import static org.mockito.Mockito.anyList; import static org.mockito.Mockito.anyMap; import static org.mockito.Mockito.contains; import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.isNull; import static org.mockito.Mockito.matches; @@ -80,9 +81,9 @@ import org.openecomp.sdc.be.externalapi.servlet.ArtifactExternalServlet; import org.openecomp.sdc.be.impl.ServletUtils; import org.openecomp.sdc.be.info.NodeTypeInfoToUpdateArtifacts; import org.openecomp.sdc.be.model.ArtifactDefinition; -import org.openecomp.sdc.be.model.ArtifactTypeDefinition; import org.openecomp.sdc.be.model.AttributeDefinition; import org.openecomp.sdc.be.model.CapabilityDefinition; +import org.openecomp.sdc.be.model.CapabilityTypeDefinition; import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.ComponentInstanceInput; @@ -114,8 +115,10 @@ import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.cache.ApplicationDataTypeCache; import org.openecomp.sdc.be.model.operations.api.ICapabilityTypeOperation; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; -import org.openecomp.sdc.be.model.operations.impl.GroupTypeOperation; import org.openecomp.sdc.be.model.operations.impl.ArtifactTypeOperation; +import org.openecomp.sdc.be.model.operations.impl.CapabilityTypeOperation; +import org.openecomp.sdc.be.model.operations.impl.GroupTypeOperation; +import org.openecomp.sdc.be.model.operations.impl.ModelOperation; import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum; import org.openecomp.sdc.be.servlets.AbstractValidationsServlet; import org.openecomp.sdc.be.tosca.CsarUtils; @@ -130,18 +133,19 @@ import org.yaml.snakeyaml.Yaml; class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTestSetup { - private static final String DEFAULT_ICON = "defaulticon"; - private final ArtifactDefinition artifactDefinition = mock(ArtifactDefinition.class); private final ResourceImportManager resourceImportManager = mock(ResourceImportManager.class); private final ServletUtils servletUtils = mock(ServletUtils.class); - private final AbstractValidationsServlet servlet = new ArtifactExternalServlet(userBusinessLogic, + private final AbstractValidationsServlet servlet = new ArtifactExternalServlet( componentInstanceBusinessLogic, componentsUtils, servletUtils, resourceImportManager, artifactsBusinessLogic); private final ApplicationDataTypeCache applicationDataTypeCache = mock(ApplicationDataTypeCache.class); private final ArtifactTypeOperation artifactTypeOperation = mock(ArtifactTypeOperation.class); private final DataTypeBusinessLogic dataTypeBusinessLogic = mock(DataTypeBusinessLogic.class); private final ArtifactTypeImportManager artifactTypeImportManager = mock(ArtifactTypeImportManager.class); private final GroupTypeOperation groupTypeOperation = mock(GroupTypeOperation.class); + private final CapabilityTypeOperation capabilityTypeOperation = mock(CapabilityTypeOperation.class); + private final CapabilityTypeImportManager capabilityTypeImportManager = mock(CapabilityTypeImportManager.class); + private final InterfaceLifecycleTypeImportManager interfaceLifecycleTypeImportManager = mock(InterfaceLifecycleTypeImportManager.class); @InjectMocks private ServiceImportBusinessLogic sIBL; @@ -190,8 +194,12 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest String resourceUniqueId = "extcp_resource"; resource.setUniqueId(resourceUniqueId); resource.setToscaArtifacts(toscaArtifacts); + resource.getComponentMetadataDefinition().getMetadataDataDefinition().setState(LifecycleStateEnum.CERTIFIED.name()); + resource.setResourceType(ResourceTypeEnum.VF); + ImmutablePair resourceTemplate = getNodeType(); String updatedNodeType = "org.openecomp.resource.cp.extCP"; + resource.setToscaResourceName(updatedNodeType); newService.setComponentInstancesProperties( Collections.singletonMap(COMPONENT_ID + "." + "zxjTestImportServiceAb", Collections.singletonList(componentInstanceProperty))); @@ -201,14 +209,16 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest .thenReturn(Either.left(newService)); when(toscaOperationFacade.validateCsarUuidUniqueness(anyString())).thenReturn(StorageOperationStatus.OK); ServiceCsarInfo csarInfo = getCsarInfo(); - when(csarBusinessLogic.getCsarInfo(any(Service.class), any(), any(User.class), any(Map.class), anyString())).thenReturn(csarInfo); + when(csarBusinessLogic.getCsarInfo(any(Service.class), any(), any(User.class), any(Map.class), anyString(), any())).thenReturn(csarInfo); when(serviceImportParseLogic.findNodeTypesArtifactsToHandle(any(Map.class), any(CsarInfo.class), any(Service.class))) .thenReturn(Either.left(new HashMap>>())); - when(csarBusinessLogic.getParsedToscaYamlInfo(anyString(), anyString(), any(), any(CsarInfo.class), any(), any(Service.class))) - .thenReturn(getParsedToscaYamlInfo()); + doReturn(getParsedToscaYamlInfo()).when(csarBusinessLogic) + .getParsedToscaYamlInfo(anyString(), anyString(), any(), any(CsarInfo.class), any(), any(Service.class)); + doReturn(getParsedToscaYamlInfo()).when(csarBusinessLogic).getParsedToscaYamlInfo(any(ServiceCsarInfo.class), any(Service.class)); when(serviceBusinessLogic.lockComponentByName(newService.getSystemName(), oldService, CREATE_RESOURCE)).thenReturn(Either.left(true)); when(toscaOperationFacade.getLatestResourceByToscaResourceName(anyString())).thenReturn(Either.left(createOldResource())); - when(serviceImportParseLogic.createServiceTransaction(oldService, csarInfo.getModifier(), false)).thenReturn(newService); + when(serviceImportParseLogic.createServiceTransaction(oldService, csarInfo.getModifier(), false, + AuditingActionEnum.CREATE_RESOURCE)).thenReturn(newService); when(serviceImportParseLogic.createInputsOnService(eq(oldService), anyMap())).thenReturn(newService); Assertions.assertDoesNotThrow(() -> { when(serviceImportParseLogic.createSubstitutionFilterOnService(eq(oldService), any())).thenReturn(newService); @@ -216,7 +226,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest when(serviceImportParseLogic.getNodeTypesFromTemplate(anyMap())).thenReturn(getNodeTypes()); when(serviceImportParseLogic.createNodeTypeResourceFromYaml(anyString(), any(Map.Entry.class), any(User.class), anyMap(), any(Service.class), anyBoolean(), any(), anyList(), anyBoolean(), any(CsarInfo.class), anyBoolean())).thenReturn( - new ImmutablePair<>(new Resource(), ActionStatus.OK)); + new ImmutablePair<>(resource, ActionStatus.OK)); when(serviceImportParseLogic.getComponentWithInstancesFilter()).thenReturn(new ComponentParametersView()); when(toscaOperationFacade.getToscaElement(anyString(), any(ComponentParametersView.class))).thenReturn(Either.left(newService)); when(serviceImportParseLogic.getComponentFilterAfterCreateRelations()).thenReturn(new ComponentParametersView()); @@ -250,17 +260,32 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest properties.add(versionProperty); typeToBeUpdated.setProperties(properties); when(applicationDataTypeCache.get(any(), eq("onap.datatypes.ToscaConceptIdentifier.datatype"))).thenReturn(Either.left(typeToBeUpdated)); - when(applicationDataTypeCache.get(any(), matches("^((?!(tosca.datatypes.test_|onap.datatypes.ToscaConceptIdentifier)).)*$"))).thenReturn(Either.left(new DataTypeDefinition())); + when(applicationDataTypeCache.get(any(), matches("^((?!(tosca.datatypes.test_|onap.datatypes.ToscaConceptIdentifier)).)*$"))).thenReturn( + Either.left(new DataTypeDefinition())); - when(artifactTypeOperation.getArtifactTypeByUid(contains("tosca.testartifacts.Name"))).thenReturn(Either.right(StorageOperationStatus.NOT_FOUND)); + when(artifactTypeOperation.getArtifactTypeByUid(contains("tosca.testartifacts.Name"))).thenReturn( + Either.right(StorageOperationStatus.NOT_FOUND)); when(artifactTypeOperation.getArtifactTypeByUid(contains("tosca.artifacts"))).thenReturn(Either.left(null)); + + when(interfaceLifecycleTypeOperation.getInterface(contains("tosca.interfaces"))).thenReturn(Either.left(new InterfaceDefinition())); + when(interfaceLifecycleTypeOperation.getInterface(contains("tosca.interfaces.test"))).thenReturn( + Either.right(StorageOperationStatus.NOT_FOUND)); + + when(capabilityTypeOperation.getCapabilityType(anyString())) + .thenReturn(Either.left(new CapabilityTypeDefinition())); + when(capabilityTypeOperation.getCapabilityType(contains("tosca.testcapabilitytypes.Name"))) + .thenReturn(Either.right(StorageOperationStatus.NOT_FOUND)); + when(toscaOperationFacade.getLatestByToscaResourceName(contains("org.openecomp.resource"), isNull())) - .thenReturn(Either.right(StorageOperationStatus.NOT_FOUND)); + .thenReturn(Either.right(StorageOperationStatus.NOT_FOUND)); when(toscaOperationFacade.getLatestByToscaResourceName(contains("tosca.nodes."), isNull())) - .thenReturn(Either.right(StorageOperationStatus.NOT_FOUND)); - when(toscaOperationFacade.getLatestByToscaResourceName(contains(updatedNodeType), isNull())).thenReturn(Either.left(resource)); - when(artifactsBusinessLogic.handleDownloadRequestById(resourceUniqueId, artifactUniqueId, user.getUserId(), ComponentTypeEnum.RESOURCE, null, null)) - .thenReturn(resourceTemplate); + .thenReturn(Either.right(StorageOperationStatus.NOT_FOUND)); + when(toscaOperationFacade.getLatestByToscaResourceName(updatedNodeType, null)).thenReturn(Either.left(resource)); + when(toscaOperationFacade.getLatestByToscaResourceName(contains("org.openecomp.service."), isNull())) + .thenReturn(Either.right(StorageOperationStatus.NOT_FOUND)); + when(artifactsBusinessLogic.handleDownloadRequestById(resourceUniqueId, artifactUniqueId, user.getUserId(), ComponentTypeEnum.RESOURCE, null, + null)) + .thenReturn(resourceTemplate); when(toscaOperationFacade.updatePropertyOfComponent(eq(oldService), any(PropertyDefinition.class))).thenReturn(Either.left(null)); when(toscaOperationFacade.updateComponentInstancePropsToComponent(anyMap(), anyString())).thenReturn(Either.left(null)); when(groupTypeOperation.getGroupTypeByUid(anyString())).thenReturn(Either.left(new GroupTypeDefinition())); @@ -286,17 +311,39 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest assertNotNull(yamlMap.get("onap.datatypes.ToscaConceptIdentifier")); ArgumentCaptor artifactTypes = ArgumentCaptor.forClass(String.class); - verify(artifactTypeImportManager).createArtifactTypes(artifactTypes.capture(),isNull(), anyBoolean()); + verify(artifactTypeImportManager).createArtifactTypes(artifactTypes.capture(), isNull(), anyBoolean()); Map artifactTypesMap = new Yaml().load(artifactTypes.getValue()); assertEquals(1, artifactTypesMap.size()); assertNotNull(artifactTypesMap.get("tosca.testartifacts.Name")); + ArgumentCaptor capabilityTypes = ArgumentCaptor.forClass(String.class); + verify(capabilityTypeImportManager).createCapabilityTypes( + capabilityTypes.capture(), + isNull(), + anyBoolean()); + Map capabilityTypesMap = new Yaml().load(capabilityTypes.getValue()); + assertEquals(1, capabilityTypesMap.size()); + assertNotNull(capabilityTypesMap.get("tosca.testcapabilitytypes.Name")); + ArgumentCaptor> nodeTypes = ArgumentCaptor.forClass(Map.class); - verify(resourceImportManager).importAllNormativeResource(nodeTypes.capture(), any(), any(), any(), - anyBoolean(), anyBoolean()); + verify(resourceImportManager).importAllNormativeResource(nodeTypes.capture(), any(), any(), any(), any(), + anyBoolean(), anyBoolean()); Map nodeTypesMap = nodeTypes.getValue(); Map newUpdatedNodeType = (Map) nodeTypesMap.get(updatedNodeType); assertEquals(8, ((Map) newUpdatedNodeType.get("properties")).size()); + Assertions.assertNull(newUpdatedNodeType.get("attributes")); + assertEquals(3, ((List>) newUpdatedNodeType.get("requirements")).size()); + assertEquals(1, ((Map) newUpdatedNodeType.get("capabilities")).size()); + assertEquals(2, ((Map) newUpdatedNodeType.get("interfaces")).size()); + + ArgumentCaptor interfaceTypes = ArgumentCaptor.forClass(String.class); + verify(interfaceLifecycleTypeImportManager).createLifecycleTypes(interfaceTypes.capture(), any(), anyBoolean()); + Map yamlInterfaceMap = new Yaml().load(interfaceTypes.getValue()); + assertEquals(3, yamlInterfaceMap.size()); + assertNotNull(yamlInterfaceMap.get("tosca.interfaces.test.node.lifecycle.Attach")); + assertNotNull(yamlInterfaceMap.get("tosca.interfaces.test.node.lifecycle.Detach")); + assertNotNull(yamlInterfaceMap.get("tosca.interfaces.test.node.lifecycle.Reconfigure")); + } @Test @@ -309,7 +356,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest when(serviceBusinessLogic.validateServiceBeforeCreate(any(Service.class), any(User.class), any(AuditingActionEnum.class))) .thenReturn(Either.left(newService)); when(toscaOperationFacade.validateCsarUuidUniqueness(anyString())).thenReturn(StorageOperationStatus.OK); - when(csarBusinessLogic.getCsarInfo(any(Service.class), any(), any(User.class), any(Map.class), anyString())).thenReturn(getCsarInfo()); + when(csarBusinessLogic.getCsarInfo(any(Service.class), any(), any(User.class), any(Map.class), anyString(), any())).thenReturn(getCsarInfo()); when(serviceImportParseLogic.findNodeTypesArtifactsToHandle(any(Map.class), any(CsarInfo.class), any(Service.class))) .thenReturn(Either.right(ActionStatus.GENERAL_ERROR)); when(csarBusinessLogic.getParsedToscaYamlInfo(anyString(), anyString(), any(), any(CsarInfo.class), anyString(), @@ -329,11 +376,11 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest new HashedMap(); when(csarBusinessLogic.getCsarInfo(any(Service.class), any(), any(User.class), - any(Map.class), anyString())).thenReturn(csarInfo); + any(Map.class), anyString(), any())).thenReturn(csarInfo); when(serviceImportParseLogic.findNodeTypesArtifactsToHandle(any(Map.class), any(CsarInfo.class), any(Service.class))).thenReturn(Either.left(map)); Assertions.assertThrows(ComponentException.class, () -> sIBL.createServiceFromCsar(oldService, - user, payload, csarUUID)); + user, payload, csarUUID, null)); } @Test @@ -359,7 +406,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest Assertions.assertThrows(ComponentException.class, () -> sIBL.createServiceFromYaml(oldService, topologyTemplateYaml, yamlName, nodeTypesInfo, csarInfo, - nodeTypesArtifactsToCreate, false, true, nodeName, user.getUserId())); + nodeTypesArtifactsToCreate, false, true, nodeName, user.getUserId(), null)); } @Test @@ -378,7 +425,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest csfyp.setParsedToscaYamlInfo(parsedToscaYamlInfo); when(toscaOperationFacade.getLatestResourceByToscaResourceName(anyString())).thenReturn(Either.left(resource)); Assertions.assertThrows(ComponentException.class, () -> sIBL.createServiceAndRIsFromYaml(oldService, - false, nodeTypesArtifactsToCreate, false, true, csfyp, user.getUserId())); + false, nodeTypesArtifactsToCreate, false, true, csfyp, user.getUserId(), null)); } @Test @@ -397,7 +444,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest csfyp.setParsedToscaYamlInfo(parsedToscaYamlInfo); when(toscaOperationFacade.getLatestResourceByToscaResourceName(anyString())).thenReturn(Either.left(resource)); Assertions.assertThrows(ComponentException.class, () -> sIBL.createServiceAndRIsFromYaml(oldService, - false, nodeTypesArtifactsToCreate, false, true, csfyp, user.getUserId())); + false, nodeTypesArtifactsToCreate, false, true, csfyp, user.getUserId(), null)); } @Test @@ -635,16 +682,13 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest artifactDefinition.setArtifactName("artifactDefinition"); deploymentArtifacts.put("deploymentArtifacts", artifactDefinition); preparedService.setDeploymentArtifacts(deploymentArtifacts); - String nodeName = "org.openecomp.resource.derivedFrom.zxjTestImportServiceAb.test"; - Map>> nodeTypesArtifactsToHandle = new HashMap<>(); - NodeTypeInfoToUpdateArtifacts nodeTypeInfoToUpdateArtifacts = new NodeTypeInfoToUpdateArtifacts(nodeName, nodeTypesArtifactsToHandle); when(toscaOperationFacade.getToscaElement(anyString())).thenReturn(Either.left(createServiceObject(true))); when(csarArtifactsAndGroupsBusinessLogic.updateResourceArtifactsFromCsar(any(CsarInfo.class), any(Service.class), anyString(), anyString(), anyList(), anyBoolean(), anyBoolean())).thenReturn(Either.left(preparedService)); Assertions.assertNotNull( sIBL.createOrUpdateArtifacts(operation, createdArtifacts, yamlFileName, csarInfo, - preparedService, nodeTypeInfoToUpdateArtifacts, true, true)); + preparedService, true, true)); } @Test @@ -1239,7 +1283,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest any(ComponentInstance.class), any(UploadReqInfo.class))).thenReturn(capabilityDefinition); when(componentsUtils.getResponseFormat(any(ActionStatus.class), anyString())).thenReturn(responseFormat); when(toscaOperationFacade.getToscaElement(anyString())).thenReturn(Either.left(service)); - Assertions.assertNotNull(sIBL.createServiceInstancesRelations(user, yamlName, service, uploadResInstancesMap)); + Assertions.assertNotNull(sIBL.createServiceInstancesRelations(user, yamlName, service, uploadResInstancesMap, null)); } @Test @@ -1250,7 +1294,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest Map uploadResInstancesMap = new HashMap<>(); Assertions.assertThrows(ComponentException.class, - () -> sIBL.createServiceInstancesRelations(user, yamlName, service, uploadResInstancesMap)); + () -> sIBL.createServiceInstancesRelations(user, yamlName, service, uploadResInstancesMap, null)); } @Test @@ -1502,6 +1546,37 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest originResource); } + @Test + void testProcessComponentInstanceInterfaces() { + Service service = createServiceObject(true); + service.setModel("testModel"); + Map> instInterfaces = new HashMap<>(); + UploadComponentInstanceInfo uploadComponentInstanceInfo = new UploadComponentInstanceInfo(); + uploadComponentInstanceInfo.setInterfaces(getInterfaces()); + ComponentInstance currentCompInstance = new ComponentInstance(); + Resource originResource = createParseResourceObject(false); + Assertions.assertNotNull(originResource); + + InterfaceDefinition interfaceDef = new InterfaceDefinition(); + interfaceDef.setUniqueId("tosca.interfaces.lifecycle.TestInterface"); + Map interfaceLifecycleTypes = new HashMap<>(); + interfaceLifecycleTypes.put("tosca.interfaces.lifecycle.TestInterface", interfaceDef); + when(interfaceLifecycleTypeOperation.getAllInterfaceLifecycleTypes("testModel")).thenReturn(Either.left(interfaceLifecycleTypes)); + + sIBL.addInterfaceValuesToRi(uploadComponentInstanceInfo, service, originResource, currentCompInstance, instInterfaces); + } + + @Test + void testProcessComponentInstanceInterfaces_null() { + Service service = createServiceObject(true); + Map> instInterfaces = new HashMap<>(); + UploadComponentInstanceInfo uploadComponentInstanceInfo = new UploadComponentInstanceInfo(); + ComponentInstance currentCompInstance = new ComponentInstance(); + Resource originResource = createParseResourceObject(false); + Assertions.assertNotNull(originResource); + sIBL.addInterfaceValuesToRi(uploadComponentInstanceInfo, service, originResource, currentCompInstance, instInterfaces); + } + @Test void testUpdateCapabilityPropertiesValues() { Either, JanusGraphOperationStatus> allDataTypes = null; @@ -1762,12 +1837,11 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest originResource.setComponentType(ComponentTypeEnum.RESOURCE); originResource.setToscaResourceName("toscaResourceName"); originResource.setResourceType(ResourceTypeEnum.VF); - originResource.setResourceType(ResourceTypeEnum.VF); Map nodeNamespaceMap = new HashMap<>(); nodeNamespaceMap.put("resources", originResource); - when(toscaOperationFacade.getLatestResourceByToscaResourceName(anyString())).thenReturn(Either.left(originResource)); + when(toscaOperationFacade.getLatestByToscaResourceName(RESOURCE_TOSCA_NAME, null)).thenReturn(Either.left(originResource)); Assertions.assertNotNull( - sIBL.validateResourceInstanceBeforeCreate(yamlName, uploadComponentInstanceInfo, nodeNamespaceMap)); + sIBL.validateResourceInstanceBeforeCreate(yamlName, null, uploadComponentInstanceInfo, nodeNamespaceMap)); } @Test @@ -2463,7 +2537,8 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest assertNotNull(mainTemplateService); final String mainTemplateContent = new String(mainTemplateService); - return new ServiceCsarInfo(user, csarUuid, csar, vfReousrceName, mainTemplateName, mainTemplateContent, false); + return new ServiceCsarInfo(user, csarUuid, csar, vfReousrceName, null, mainTemplateName, mainTemplateContent, false, + mock(ModelOperation.class)); } catch (URISyntaxException | ZipException e) { fail(e); } @@ -2473,7 +2548,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest private ImmutablePair getNodeType() { try { File resource = new File( - ServiceImportBusinessLogicTest.class.getClassLoader().getResource("node-types/resource-Extcp-template.yml").toURI()); + ServiceImportBusinessLogicTest.class.getClassLoader().getResource("node-types/resource-Extcp-template.yml").toURI()); byte[] extcpResource = Files.readAllBytes(resource.toPath()); return new ImmutablePair<>("org.openecomp.resource.cp.extCP", extcpResource);