diff options
author | davsad <david.sadlier@est.tech> | 2021-07-24 19:40:56 +0100 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2021-08-06 15:22:51 +0000 |
commit | 0ed125f98ae8ea9e80c855a640c328654660d081 (patch) | |
tree | 2ff63490ba093726164a1199aeef6605bb3652ff /catalog-be/src/test | |
parent | 84aa83e9203d6f890cc5f425a00ac748d47c5c8f (diff) |
Consider component model when retrieving interface types
Issue-ID: SDC-3414
Signed-off-by: davsad <david.sadlier@est.tech>
Change-Id: Ie16a2604cfdff042e32bfa4f9a3a509b5da22226
Diffstat (limited to 'catalog-be/src/test')
4 files changed, 59 insertions, 51 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/ResourceImportManagerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/ResourceImportManagerTest.java index a9368b2b01..00e0681c8d 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/ResourceImportManagerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/ResourceImportManagerTest.java @@ -34,12 +34,13 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.when; -import fj.data.Either; import java.io.IOException; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; + +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.ImmutablePair; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; @@ -87,6 +88,8 @@ import org.openecomp.sdc.common.impl.FSConfigurationSource; import org.openecomp.sdc.exception.PolicyException; import org.openecomp.sdc.exception.ResponseFormat; +import fj.data.Either; + public class ResourceImportManagerTest { static ResourceImportManager importManager; @@ -236,7 +239,7 @@ public class ResourceImportManagerTest { operations.put("configure", new OperationDataDefinition()); interfaceDefinition.setOperations(operations ); interfaceTypes.put("tosca.interfaces.node.lifecycle.standard", interfaceDefinition); - when(interfaceOperationBusinessLogic.getAllInterfaceLifecycleTypes()).thenReturn(Either.left(interfaceTypes)); + when(interfaceOperationBusinessLogic.getAllInterfaceLifecycleTypes(any())).thenReturn(Either.left(interfaceTypes)); final ImmutablePair<Resource, ActionStatus> createResource = importManager .importNormativeResource(jsonContent, resourceMD, user, true, true); @@ -261,7 +264,7 @@ public class ResourceImportManagerTest { operations.put("configure", new OperationDataDefinition()); interfaceDefinition.setOperations(operations ); interfaceTypes.put("tosca.interfaces.node.lifecycle.standard", interfaceDefinition); - when(interfaceOperationBusinessLogic.getAllInterfaceLifecycleTypes()).thenReturn(Either.left(interfaceTypes)); + when(interfaceOperationBusinessLogic.getAllInterfaceLifecycleTypes(any())).thenReturn(Either.left(interfaceTypes)); ImmutablePair<Resource, ActionStatus> createResource = importManager.importNormativeResource(jsonContent, resourceMD, user, true, true); assertNull(createResource.left.getInterfaces()); @@ -285,7 +288,7 @@ public class ResourceImportManagerTest { operations.put("configure", new OperationDataDefinition()); interfaceDefinition.setOperations(operations ); interfaceTypes.put("tosca.interfaces.node.lifecycle.standard", interfaceDefinition); - when(interfaceOperationBusinessLogic.getAllInterfaceLifecycleTypes()).thenReturn(Either.left(interfaceTypes)); + when(interfaceOperationBusinessLogic.getAllInterfaceLifecycleTypes(any())).thenReturn(Either.left(interfaceTypes)); ImmutablePair<Resource, ActionStatus> createResource = importManager.importNormativeResource(jsonContent, resourceMD, user, true, true); assertNull(createResource.left.getInterfaces()); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandlerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandlerTest.java index f819eceb43..83fa8e2da5 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandlerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandlerTest.java @@ -29,7 +29,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.Mockito.when; -import fj.data.Either; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.nio.file.Path; @@ -39,7 +38,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; + import org.apache.commons.collections.MapUtils; +import org.apache.commons.lang3.StringUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -53,6 +54,8 @@ import org.openecomp.sdc.be.datatypes.elements.OperationInputDefinition; import org.openecomp.sdc.be.model.InterfaceDefinition; import org.yaml.snakeyaml.Yaml; +import fj.data.Either; + @ExtendWith(MockitoExtension.class) class InterfaceDefinitionHandlerTest { @@ -84,20 +87,20 @@ class InterfaceDefinitionHandlerTest { operations.put(DELETE_OPERATION, new OperationDataDefinition()); interfaceLifecyleStandard.setOperations(operations); interfaceTypes.put(INTERFACE_TYPE, interfaceLifecyleStandard); - when(interfaceOperationBusinessLogic.getAllInterfaceLifecycleTypes()).thenReturn(Either.left(interfaceTypes)); + when(interfaceOperationBusinessLogic.getAllInterfaceLifecycleTypes(StringUtils.EMPTY)).thenReturn(Either.left(interfaceTypes)); } @Test void testCreateWithLegacyOperationDeclarationSuccess() throws FileNotFoundException { final Map<String, Object> load = loadYaml(Paths.get("interfaceDefinition-legacy.yaml")); - final InterfaceDefinition actualInterfaceDefinition = interfaceDefinitionHandler.create(load); + final InterfaceDefinition actualInterfaceDefinition = interfaceDefinitionHandler.create(load, StringUtils.EMPTY); assertInterfaceDefinition(actualInterfaceDefinition); } @Test void testCreateWithOperationSuccess() throws FileNotFoundException { final Map<String, Object> load = loadYaml(Paths.get("interfaceDefinition-tosca1.3.yaml")); - final InterfaceDefinition actualInterfaceDefinition = interfaceDefinitionHandler.create(load); + final InterfaceDefinition actualInterfaceDefinition = interfaceDefinitionHandler.create(load, StringUtils.EMPTY); assertInterfaceDefinition(actualInterfaceDefinition); } diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java index 3ab235c779..724bf6ab34 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java @@ -16,7 +16,21 @@ package org.openecomp.sdc.be.components.impl; -import fj.data.Either; +import static org.junit.Assert.fail; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyMap; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.when; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang3.StringUtils; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -57,19 +71,7 @@ import org.openecomp.sdc.common.impl.FSConfigurationSource; import org.openecomp.sdc.exception.ResponseFormat; import org.openecomp.sdc.test.utils.InterfaceOperationTestUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.junit.Assert.fail; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyBoolean; -import static org.mockito.ArgumentMatchers.anyMap; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.when; +import fj.data.Either; @RunWith(MockitoJUnitRunner.class) public class InterfaceOperationBusinessLogicTest { @@ -147,7 +149,7 @@ public class InterfaceOperationBusinessLogicTest { @Test public void createInterfaceOperationTestOnExistingInterface() { - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); when(interfaceOperation.updateInterfaces(any(), any())).thenReturn(Either.left( Collections.singletonList(InterfaceOperationTestUtils.createMockInterface(interfaceId, operationId, operationName)))); @@ -161,7 +163,7 @@ public class InterfaceOperationBusinessLogicTest { @Test public void createInterfaceOperationTestOnExistingInterfaceInputsFromCapProp() { - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); when(interfaceOperation.updateInterfaces(any(), any())).thenReturn(Either.left( Collections.singletonList(InterfaceOperationTestUtils.createMockInterface(interfaceId, operationId, operationName)))); @@ -200,7 +202,7 @@ public class InterfaceOperationBusinessLogicTest { @Test public void createInterfaceOperationWithoutInterfaceTest() { resource.getInterfaces().clear(); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); when(interfaceOperation.addInterfaces(any(), any())).thenReturn(Either.left( Collections.singletonList(InterfaceOperationTestUtils.createMockInterface(interfaceId, operationId, operationName)))); @@ -217,7 +219,7 @@ public class InterfaceOperationBusinessLogicTest { @Test public void createInterfaceOperationWithoutInterfaceTestFail() { resource.getInterfaces().clear(); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); when(interfaceOperation.addInterfaces(any(), any())) .thenReturn(Either.right(StorageOperationStatus.GENERAL_ERROR)); @@ -231,7 +233,7 @@ public class InterfaceOperationBusinessLogicTest { @Test public void shouldFailWhenCreateInterfaceOperationFailedTest() { - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); when(interfaceOperation.updateInterfaces(any(), any())) .thenReturn(Either.right(StorageOperationStatus.NOT_FOUND)); @@ -242,7 +244,7 @@ public class InterfaceOperationBusinessLogicTest { @Test public void updateInterfaceOperationTestWithArtifactSuccess() { - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); when(artifactToscaOperation.removeArifactFromResource(any(), any(), any(), anyBoolean())) .thenReturn(Either.left(new ArtifactDefinition())); @@ -260,7 +262,7 @@ public class InterfaceOperationBusinessLogicTest { @Test public void updateInterfaceOperationTestWithArtifactFailure() { - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); when(artifactToscaOperation.getArtifactById(any(), any())).thenReturn(Either.left(new ArtifactDefinition())); when(artifactToscaOperation.removeArifactFromResource(any(), any(), any(), anyBoolean())) @@ -275,7 +277,7 @@ public class InterfaceOperationBusinessLogicTest { @Test public void updateInterfaceOperationTestWithoutArtifact() { - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); when(artifactToscaOperation.getArtifactById(any(), any())).thenReturn(Either.right(StorageOperationStatus.NOT_FOUND)); when(interfaceOperation.updateInterfaces(any(), any())).thenReturn(Either.left( @@ -290,7 +292,7 @@ public class InterfaceOperationBusinessLogicTest { @Test public void updateInterfaceOperationTestDoesntExist() { - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); Either<List<InterfaceDefinition>, ResponseFormat> interfaceOperation = interfaceOperationBusinessLogic.updateInterfaceOperation(resourceId, @@ -302,7 +304,7 @@ public class InterfaceOperationBusinessLogicTest { @Test public void createInterfaceOperationTestFailOnException() { - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); when(interfaceOperation.updateInterfaces(any(), any())).thenThrow(new RuntimeException()); Either<List<InterfaceDefinition>, ResponseFormat> interfaceOperationEither = @@ -315,7 +317,7 @@ public class InterfaceOperationBusinessLogicTest { @Test public void createInterfaceOperationTestFailOnFetchinGlobalTypes() { - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.right(StorageOperationStatus.NOT_FOUND)); Either<List<InterfaceDefinition>, ResponseFormat> interfaceOperationEither = interfaceOperationBusinessLogic.createInterfaceOperation(resourceId, @@ -327,7 +329,7 @@ public class InterfaceOperationBusinessLogicTest { @Test public void createInterfaceOperationTestFailOnValidation() { - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); when(interfaceOperationValidation .validateInterfaceOperations(any(), any(), any(), anyMap(), anyBoolean())) @@ -510,10 +512,10 @@ public class InterfaceOperationBusinessLogicTest { @Test public void testGetAllInterfaceLifecycleTypes_TypesNotFound() { - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.right(StorageOperationStatus.NOT_FOUND)); Either<Map<String, InterfaceDefinition>, ResponseFormat> response = - interfaceOperationBusinessLogic.getAllInterfaceLifecycleTypes(); + interfaceOperationBusinessLogic.getAllInterfaceLifecycleTypes(any()); Assert.assertTrue(response.isRight()); } @@ -524,10 +526,10 @@ public class InterfaceOperationBusinessLogicTest { interfaceDefinition.setType(interfaceId); Map<String, InterfaceDefinition> interfaceDefinitionMap = new HashMap<>(); interfaceDefinitionMap.put(interfaceDefinition.getUniqueId(), interfaceDefinition); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(interfaceDefinitionMap)); Either<Map<String, InterfaceDefinition>, ResponseFormat> response = - interfaceOperationBusinessLogic.getAllInterfaceLifecycleTypes(); + interfaceOperationBusinessLogic.getAllInterfaceLifecycleTypes(StringUtils.EMPTY); Assert.assertEquals(1, response.left().value().size()); } diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java index acd4cb4128..5c8d522482 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/ToscaExportHandlerTest.java @@ -239,7 +239,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { when(dataTypeCache.getAll()).thenReturn(Either.left(new HashMap<>())); when(capabilityRequirementConverter.convertRequirements(any(Map.class), any(Resource.class), any(ToscaNodeType.class))).thenReturn(Either.left(new ToscaNodeType())); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); // default test when component is Resource @@ -264,7 +264,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { ((Resource) component).setInterfaces(new HashMap<>()); when(dataTypeCache.getAll()).thenReturn(Either.right(JanusGraphOperationStatus.NOT_FOUND)); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); // default test when convertInterfaceNodeType is right result = testSubject.exportComponentInterface(component, false); @@ -296,7 +296,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { component.setName(RESOURCE_NAME); component.setToscaResourceName(RESOURCE_NAME); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); when(dataTypeCache.getAll()).thenReturn(Either.left(new HashMap<>())); // when convertRequirements is called, make it return the same value as 3rd (index=2) argument. @@ -581,7 +581,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { Either<ToscaTemplate, ToscaError> result; when(dataTypeCache.getAll()).thenReturn(Either.right(JanusGraphOperationStatus.ALREADY_EXIST)); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); // default test result = Deencapsulation @@ -600,7 +600,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { component.setInputs(inputs); when(dataTypeCache.getAll()).thenReturn(Either.left(new HashMap<>())); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); when(capabilityRequirementConverter.convertRequirements(any(Map.class), any(Resource.class), @@ -729,7 +729,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { when(capabilityRequirementConverter .convertComponentInstanceCapabilities(any(ComponentInstance.class), any(Map.class), any(ToscaNodeTemplate.class))) .thenReturn(Either.left(new ToscaNodeTemplate())); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()).thenReturn(Either.left(Collections.emptyMap())); + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())).thenReturn(Either.left(Collections.emptyMap())); when(dataTypeCache.getAll()).thenReturn(Either.left(new HashMap<>())); when(capabilityRequirementConverter.convertRequirements(any(Map.class), any(Resource.class), any(ToscaNodeType.class))) .thenReturn(Either.left(new ToscaNodeType())); @@ -853,7 +853,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { when(capabilityRequirementConverter .convertComponentInstanceCapabilities(any(ComponentInstance.class), any(Map.class), any(ToscaNodeTemplate.class))) .thenReturn(Either.left(new ToscaNodeTemplate())); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()).thenReturn(Either.left(Collections.emptyMap())); + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())).thenReturn(Either.left(Collections.emptyMap())); when(dataTypeCache.getAll()).thenReturn(Either.left(new HashMap<>())); when(capabilityRequirementConverter.convertRequirements(any(Map.class), any(Resource.class), any(ToscaNodeType.class))) .thenReturn(Either.left(new ToscaNodeType())); @@ -916,7 +916,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { when(capabilityRequirementConverter .convertComponentInstanceCapabilities(any(ComponentInstance.class), any(Map.class), any(ToscaNodeTemplate.class))) .thenReturn(Either.right(ToscaError.GENERAL_ERROR)); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()).thenReturn(Either.left(Collections.emptyMap())); + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())).thenReturn(Either.left(Collections.emptyMap())); when(dataTypeCache.getAll()).thenReturn(Either.left(new HashMap<>())); when(capabilityRequirementConverter.convertRequirements(any(Map.class), any(Resource.class), any(ToscaNodeType.class))).thenReturn(Either.left(new ToscaNodeType())); @@ -967,7 +967,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { componentCache.put("uid", component); when(capabilityRequirementConverter.getOriginComponent(any(Map.class), any(ComponentInstance.class))).thenReturn(Either.right(false)); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()).thenReturn(Either.left(Collections.emptyMap())); + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())).thenReturn(Either.left(Collections.emptyMap())); when(dataTypeCache.getAll()).thenReturn(Either.left(new HashMap<>())); when(capabilityRequirementConverter.convertRequirements(any(Map.class), any(Resource.class), any(ToscaNodeType.class))).thenReturn(Either.left(new ToscaNodeType())); @@ -1022,7 +1022,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { doReturn(Either.left(component)).when(toscaOperationFacade).getToscaFullElement("id"); when(capabilityRequirementConverter.getOriginComponent(any(Map.class), any(ComponentInstance.class))).thenReturn(Either.left(component)); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()).thenReturn(Either.left(Collections.emptyMap())); + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())).thenReturn(Either.left(Collections.emptyMap())); when(dataTypeCache.getAll()).thenReturn(Either.left(new HashMap<>())); when(capabilityRequirementConverter.convertRequirements(any(Map.class), any(Resource.class), any(ToscaNodeType.class))).thenReturn(Either.left(new ToscaNodeType())); @@ -1087,7 +1087,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { when(toscaOperationFacade.getToscaElement(any(String.class), any(ComponentParametersView.class))) .thenReturn(Either.left(new Resource())); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.right(StorageOperationStatus.BAD_REQUEST)); result = Deencapsulation.invoke(testSubject, "createProxyInterfaceTypes", container); Assert.assertTrue(result.isRight()); @@ -1105,7 +1105,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { componentInstances.add(instance); container.setComponentInstances(componentInstances); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); Component proxyResource = new Resource(); @@ -1163,7 +1163,7 @@ public class ToscaExportHandlerTest extends BeConfDependentTest { componentInstances.add(instance); containerService.setComponentInstances(componentInstances); - when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes()) + when(interfaceLifecycleOperation.getAllInterfaceLifecycleTypes(any())) .thenReturn(Either.left(Collections.emptyMap())); when(dataTypeCache.getAll()).thenReturn(Either.left(new HashMap<>())); when(capabilityRequirementConverter.convertRequirements(any(Map.class), any(Service.class), |