diff options
author | 2021-05-31 18:28:08 -0400 | |
---|---|---|
committer | 2021-07-30 12:24:31 -0400 | |
commit | ed5c51313c1bd3745a554888c969e840341599b0 (patch) | |
tree | 27b6ed17d52f0d8b14428c98b0886d60a70670bc /bpmn/MSOCommonBPMN/src/test/java | |
parent | 1be8408f26d3f20cf2ffb923a956b7ba6dfbd994 (diff) |
Support instantiation of same model vnfs/vf-modules
When instantiating a service with multiple vnfs and/or vfmodules
SO would differentiate using ModelCustomizationId. This would cause
issues when creating multiple instances of same model resource, and
each lookup would return the same object.
Instead of using ModelCustomizationId, this patch enables SO to use
instanceName parameter to differentiate the resources. Validation was
added to ensure that instanceNames are provided if there are multiple
resources of the same model. If there are no duplicate resources and
instanceName is not set, SO will default to previous logic using
ModelCustomizationId.
In order to properly associate vfmodules with their parent vnfs, the
Resource class was augmented with a parent reference which maintains
the relationship in further processing.
Id generation logic was corrected to ensure that multiple resources
of the same model are assigned unique instance ids and references to
parent instanceId.
Issue-ID: SO-3677
Change-Id: If39a0138f501177e12262f8e911137012e287fca
Signed-off-by: Michael Pruss <michael.pruss@bell.ca>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test/java')
6 files changed, 240 insertions, 74 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java index 127253a72e..8961c996a8 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java @@ -131,6 +131,8 @@ import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; +import org.onap.so.serviceinstancebeans.VfModules; +import org.onap.so.serviceinstancebeans.Vnfs; @RunWith(MockitoJUnitRunner.class) public class BBInputSetupTest { @@ -2116,6 +2118,8 @@ public class BBInputSetupTest { String volumeGroupId = "volumeGroupId"; String configurationId = "configurationId"; String instanceGroupId = "instancegroupId"; + String vnfInstanceName = "vnfInstanceName"; + String vfModuleInstanceName = "vfModuleInstanceName"; expected.put(ResourceKey.SERVICE_INSTANCE_ID, serviceInstanceId); expected.put(ResourceKey.NETWORK_ID, networkId); @@ -2125,6 +2129,8 @@ public class BBInputSetupTest { expected.put(ResourceKey.VOLUME_GROUP_ID, volumeGroupId); expected.put(ResourceKey.CONFIGURATION_ID, configurationId); expected.put(ResourceKey.INSTANCE_GROUP_ID, instanceGroupId); + expected.put(ResourceKey.VNF_INSTANCE_NAME, vnfInstanceName); + expected.put(ResourceKey.VF_MODULE_INSTANCE_NAME, vfModuleInstanceName); WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds(); workflowResourceIds.setServiceInstanceId(serviceInstanceId); @@ -2135,6 +2141,8 @@ public class BBInputSetupTest { workflowResourceIds.setVolumeGroupId(volumeGroupId); workflowResourceIds.setConfigurationId(configurationId); workflowResourceIds.setInstanceGroupId(instanceGroupId); + workflowResourceIds.setVnfInstanceName(vnfInstanceName); + workflowResourceIds.setVfModuleInstanceName(vfModuleInstanceName); SPY_bbInputSetup.populateLookupKeyMapWithIds(workflowResourceIds, actual); @@ -2142,6 +2150,44 @@ public class BBInputSetupTest { } @Test + public void testGetVfModulesByInstanceName() throws IOException { + org.onap.so.serviceinstancebeans.Service serviceMacro = mapper.readValue( + new File(RESOURCE_PATH + "ServiceMacroVfModules.json"), org.onap.so.serviceinstancebeans.Service.class); + Resources resources = serviceMacro.getResources(); + VfModules expectedVfModule = resources.getVnfs().get(0).getVfModules().get(2); + assertEquals(expectedVfModule, + SPY_bbInputSetup.getVfModulesByInstanceName("vmxnjr001_AVPN_base_vRE_BV_expansion_002", resources)); + } + + @Test + public void testGetVfModulesByKey() throws IOException { + org.onap.so.serviceinstancebeans.Service serviceMacro = mapper.readValue( + new File(RESOURCE_PATH + "ServiceMacroVfModules.json"), org.onap.so.serviceinstancebeans.Service.class); + Resources resources = serviceMacro.getResources(); + VfModules expectedVfModule = resources.getVnfs().get(0).getVfModules().get(0); + assertEquals(expectedVfModule, + SPY_bbInputSetup.getVfModulesByKey("a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f", resources)); + } + + @Test + public void testFindVnfsByInstanceName() throws IOException { + org.onap.so.serviceinstancebeans.Service serviceMacro = mapper.readValue( + new File(RESOURCE_PATH + "ServiceMacroVfModules.json"), org.onap.so.serviceinstancebeans.Service.class); + Resources resources = serviceMacro.getResources(); + Vnfs expectedVnf = resources.getVnfs().get(0); + assertEquals(expectedVnf, SPY_bbInputSetup.findVnfsByInstanceName("vmxnjr001", resources)); + } + + @Test + public void testVnfsByKey() throws IOException { + org.onap.so.serviceinstancebeans.Service serviceMacro = mapper.readValue( + new File(RESOURCE_PATH + "ServiceMacroVfModules.json"), org.onap.so.serviceinstancebeans.Service.class); + Resources resources = serviceMacro.getResources(); + Vnfs expectedVnf = resources.getVnfs().get(0); + assertEquals(expectedVnf, SPY_bbInputSetup.findVnfsByKey("ab153b6e-c364-44c0-bef6-1f2982117f04", resources)); + } + + @Test public void testGBBMacroNoUserParamsVrfConfiguration() throws Exception { String resourceId = "123"; String vnfType = "vnfType"; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/AbstractVnfCDSRequestProviderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/AbstractVnfCDSRequestProviderTest.java index 06defaa84c..6de1364a47 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/AbstractVnfCDSRequestProviderTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/AbstractVnfCDSRequestProviderTest.java @@ -82,6 +82,7 @@ public abstract class AbstractVnfCDSRequestProviderTest { @Before public void setUp() { buildingBlockExecution = createBuildingBlockExecution(); + buildingBlockExecution.setVariable("lookupKeyMap", new HashMap<>()); executeBuildingBlock = new ExecuteBuildingBlock(); } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/ConfigureInstanceParamsForVfModuleTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/ConfigureInstanceParamsForVfModuleTest.java index 9baf5dc5bf..0273b9dbf6 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/ConfigureInstanceParamsForVfModuleTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/ConfigureInstanceParamsForVfModuleTest.java @@ -20,27 +20,27 @@ package org.onap.so.client.cds; +import static org.junit.Assert.assertEquals; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; import com.google.gson.JsonObject; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.UUID; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; -import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.so.serviceinstancebeans.ModelInfo; import org.onap.so.serviceinstancebeans.Resources; import org.onap.so.serviceinstancebeans.Service; import org.onap.so.serviceinstancebeans.VfModules; import org.onap.so.serviceinstancebeans.Vnfs; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.mockito.ArgumentMatchers.anyList; -import static org.mockito.Mockito.doReturn; -@RunWith(MockitoJUnitRunner.Silent.class) +@RunWith(MockitoJUnitRunner.class) public class ConfigureInstanceParamsForVfModuleTest { @InjectMocks @@ -49,79 +49,77 @@ public class ConfigureInstanceParamsForVfModuleTest { @Mock private ExtractServiceFromUserParameters extractServiceFromUserParameters; - private static final String TEST_VNF_MODEL_CUSTOMIZATION_UUID = "23ce9ac4-e5dd-11e9-81b4-2a2ae2dbcce4"; - private static final String TEST_VF_MODULE_CUSTOMIZATION_UUID = "23ce9ac4-e5dd-11e9-81b4-2a2ae2dbcce2"; - private static final String TEST_INSTANCE_PARAM_VALUE_1 = "vf-module-1-value"; - private static final String TEST_INSTANCE_PARAM_VALUE_2 = "vf-module-2-value"; - private static final String TEST_INSTANCE_PARAM_KEY_1 = "instance-param-1"; - private static final String TEST_INSTANCE_PARAM_KEY_2 = "instance-param-2"; + private static final String VNF_CUSTOMIZATION_ID = UUID.randomUUID().toString(); + private static final String VFMODULE_1_CUSTOMIZATION_ID = UUID.randomUUID().toString(); + private static final String VFMODULE_2_CUSTOMIZATION_ID = UUID.randomUUID().toString(); + private static final String VFMODULE_1_INSTANCE_NAME = "vfmodule-instance-1"; + private static final String VFMODULE_2_INSTANCE_NAME = "vfmodule-instance-2"; + private static final List<Map<String, String>> VFMODULE_1_INSTANCE_PARAMS = + Arrays.asList(Map.of("param-1", "xyz", "param-2", "123"), Map.of("param-3", "CCC")); + private static final List<Map<String, String>> VFMODULE_2_INSTANCE_PARAMS = + Arrays.asList(Map.of("param-1", "abc", "param-2", "999"), Map.of("param-3", "AAA")); + @Test - public void testInstanceParamsForVfModule() throws Exception { - // given - List<Map<String, Object>> userParamsFromRequest = createRequestParameters(); - JsonObject jsonObject = new JsonObject(); - doReturn(getUserParams()).when(extractServiceFromUserParameters).getServiceFromRequestUserParams(anyList()); + public void testPopulateInstanceParamsByInstanceName() throws Exception { + Service service = new Service(); + Resources resources = new Resources(); + resources.setVnfs(createVnfs()); + service.setResources(resources); - // when - configureInstanceParamsForVfModule.populateInstanceParams(jsonObject, userParamsFromRequest, - TEST_VNF_MODEL_CUSTOMIZATION_UUID, TEST_VF_MODULE_CUSTOMIZATION_UUID); + when(extractServiceFromUserParameters.getServiceFromRequestUserParams(any())).thenReturn(service); + JsonObject jsonObject = new JsonObject(); - // verify - assertEquals(TEST_INSTANCE_PARAM_VALUE_1, jsonObject.get(TEST_INSTANCE_PARAM_KEY_1).getAsString()); - assertEquals(TEST_INSTANCE_PARAM_VALUE_2, jsonObject.get(TEST_INSTANCE_PARAM_KEY_2).getAsString()); - } + configureInstanceParamsForVfModule.populateInstanceParams(jsonObject, new ArrayList<>(), VNF_CUSTOMIZATION_ID, + VFMODULE_2_CUSTOMIZATION_ID, VFMODULE_2_INSTANCE_NAME); - private List<Map<String, Object>> createRequestParameters() { - List<Map<String, Object>> userParams = new ArrayList<>(); - Map<String, Object> userParamMap = new HashMap<>(); - userParamMap.put("service", getUserParams()); - userParams.add(userParamMap); - return userParams; + assertEquals("abc", jsonObject.get("param-1").getAsString()); + assertEquals("999", jsonObject.get("param-2").getAsString()); + assertEquals("AAA", jsonObject.get("param-3").getAsString()); } - private Service getUserParams() { + @Test + public void testPopulateInstanceParamsByCustomizationId() throws Exception { Service service = new Service(); Resources resources = new Resources(); resources.setVnfs(createVnfs()); service.setResources(resources); - return service; - } - - private List<Vnfs> createVnfs() { - Vnfs searchedVnf = createVnf(); - List<Vnfs> vnfList = new ArrayList<>(); - vnfList.add(searchedVnf); - return vnfList; - } - - private Vnfs createVnf() { - Vnfs vnf = new Vnfs(); - ModelInfo modelInfoForVnf = new ModelInfo(); - modelInfoForVnf.setModelCustomizationId(TEST_VNF_MODEL_CUSTOMIZATION_UUID); - vnf.setModelInfo(modelInfoForVnf); - - VfModules vfModule = new VfModules(); - ModelInfo modelInfoForVfModule = new ModelInfo(); - modelInfoForVfModule.setModelCustomizationId(TEST_VF_MODULE_CUSTOMIZATION_UUID); - - vfModule.setModelInfo(modelInfoForVfModule); - - // Set instance parameters. - List<Map<String, String>> instanceParamsListSearchedVfModule = new ArrayList<>(); - Map<String, String> instanceParams = new HashMap<>(); - instanceParams.put("instance-param-1", TEST_INSTANCE_PARAM_VALUE_1); - instanceParams.put("instance-param-2", TEST_INSTANCE_PARAM_VALUE_2); - - instanceParamsListSearchedVfModule.add(instanceParams); - vfModule.setInstanceParams(instanceParamsListSearchedVfModule); + when(extractServiceFromUserParameters.getServiceFromRequestUserParams(any())).thenReturn(service); + JsonObject jsonObject = new JsonObject(); - List<VfModules> vfModules = new ArrayList<>(); - vfModules.add(vfModule); + // No instance name is passed + configureInstanceParamsForVfModule.populateInstanceParams(jsonObject, new ArrayList<>(), VNF_CUSTOMIZATION_ID, + VFMODULE_1_CUSTOMIZATION_ID, null); - vnf.setVfModules(vfModules); + assertEquals("xyz", jsonObject.get("param-1").getAsString()); + assertEquals("123", jsonObject.get("param-2").getAsString()); + assertEquals("CCC", jsonObject.get("param-3").getAsString()); + } - return vnf; + private List<Vnfs> createVnfs() { + Vnfs vnf1 = new Vnfs(); + ModelInfo modelInfo = new ModelInfo(); + modelInfo.setModelCustomizationId(VNF_CUSTOMIZATION_ID); + vnf1.setModelInfo(modelInfo); + + VfModules vfModule1 = new VfModules(); + modelInfo = new ModelInfo(); + modelInfo.setModelCustomizationId(VFMODULE_1_CUSTOMIZATION_ID); + vfModule1.setModelInfo(modelInfo); + vfModule1.setInstanceName(VFMODULE_1_INSTANCE_NAME); + vfModule1.setInstanceParams(VFMODULE_1_INSTANCE_PARAMS); + + VfModules vfModule2 = new VfModules(); + modelInfo = new ModelInfo(); + modelInfo.setModelCustomizationId(VFMODULE_2_CUSTOMIZATION_ID); + vfModule2.setModelInfo(modelInfo); + vfModule2.setInstanceName(VFMODULE_2_INSTANCE_NAME); + vfModule2.setInstanceParams(VFMODULE_2_INSTANCE_PARAMS); + + vnf1.setVfModules(Arrays.asList(vfModule1, vfModule2)); + + return Arrays.asList(vnf1); } + } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/ConfigureInstanceParamsForVnfTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/ConfigureInstanceParamsForVnfTest.java new file mode 100644 index 0000000000..547129e898 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/ConfigureInstanceParamsForVnfTest.java @@ -0,0 +1,114 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2021 Bell Canada + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.cds; + +import static org.junit.Assert.assertEquals; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; +import com.google.gson.JsonObject; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnitRunner; +import org.onap.so.serviceinstancebeans.ModelInfo; +import org.onap.so.serviceinstancebeans.Resources; +import org.onap.so.serviceinstancebeans.Service; +import org.onap.so.serviceinstancebeans.Vnfs; + +@RunWith(MockitoJUnitRunner.class) +public class ConfigureInstanceParamsForVnfTest { + + @InjectMocks + private ConfigureInstanceParamsForVnf configureInstanceParamsForVnf; + + @Mock + private ExtractServiceFromUserParameters extractServiceFromUserParameters; + + private static final String VNF_1_CUSTOMIZATION_ID = UUID.randomUUID().toString(); + private static final String VNF_2_CUSTOMIZATION_ID = UUID.randomUUID().toString(); + private static final String VNF_1_INSTANCE_NAME = "vnf-instance-1"; + private static final String VNF_2_INSTANCE_NAME = "vnf-instance-2"; + private static final List<Map<String, String>> VNF_1_INSTANCE_PARAMS = + Arrays.asList(Map.of("param-1", "xyz", "param-2", "123"), Map.of("param-3", "CCC")); + private static final List<Map<String, String>> VNF_2_INSTANCE_PARAMS = + Arrays.asList(Map.of("param-1", "abc", "param-2", "999"), Map.of("param-3", "AAA")); + + + @Test + public void testPopulateInstanceParamsByInstanceName() throws Exception { + Service service = new Service(); + Resources resources = new Resources(); + resources.setVnfs(createVnfs()); + service.setResources(resources); + when(extractServiceFromUserParameters.getServiceFromRequestUserParams(any())).thenReturn(service); + JsonObject jsonObject = new JsonObject(); + + configureInstanceParamsForVnf.populateInstanceParams(jsonObject, new ArrayList<>(), VNF_2_CUSTOMIZATION_ID, + VNF_2_INSTANCE_NAME); + + assertEquals("abc", jsonObject.get("param-1").getAsString()); + assertEquals("999", jsonObject.get("param-2").getAsString()); + assertEquals("AAA", jsonObject.get("param-3").getAsString()); + } + + @Test + public void testPopulateInstanceParamsByCustomizationId() throws Exception { + Service service = new Service(); + Resources resources = new Resources(); + resources.setVnfs(createVnfs()); + service.setResources(resources); + when(extractServiceFromUserParameters.getServiceFromRequestUserParams(any())).thenReturn(service); + JsonObject jsonObject = new JsonObject(); + + // No instance name is passed + configureInstanceParamsForVnf.populateInstanceParams(jsonObject, new ArrayList<>(), VNF_1_CUSTOMIZATION_ID, + null); + + assertEquals("xyz", jsonObject.get("param-1").getAsString()); + assertEquals("123", jsonObject.get("param-2").getAsString()); + assertEquals("CCC", jsonObject.get("param-3").getAsString()); + } + + private List<Vnfs> createVnfs() { + Vnfs vnf1 = new Vnfs(); + vnf1.setInstanceName(VNF_1_INSTANCE_NAME); + ModelInfo modelInfo = new ModelInfo(); + modelInfo.setModelCustomizationId(VNF_1_CUSTOMIZATION_ID); + vnf1.setModelInfo(modelInfo); + vnf1.setInstanceParams(VNF_1_INSTANCE_PARAMS); + + Vnfs vnf2 = new Vnfs(); + modelInfo = new ModelInfo(); + modelInfo.setModelCustomizationId(VNF_2_CUSTOMIZATION_ID); + vnf2.setModelInfo(modelInfo); + vnf2.setInstanceName(VNF_2_INSTANCE_NAME); + vnf2.setInstanceParams(VNF_2_INSTANCE_PARAMS); + + return Arrays.asList(vnf1, vnf2); + } + +} diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/VfModuleCDSRequestProviderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/VfModuleCDSRequestProviderTest.java index f224ebf21e..f5045b1ea0 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/VfModuleCDSRequestProviderTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/VfModuleCDSRequestProviderTest.java @@ -22,18 +22,28 @@ package org.onap.so.client.cds; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.JsonObject; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.UUID; import org.junit.Test; +import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Spy; +import org.mockito.junit.MockitoJUnitRunner; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; -import org.onap.so.client.exception.PayloadGenerationException; +import org.onap.so.serviceinstancebeans.ModelInfo; +import org.onap.so.serviceinstancebeans.Resources; import org.onap.so.serviceinstancebeans.Service; +import org.onap.so.serviceinstancebeans.VfModules; +import org.onap.so.serviceinstancebeans.Vnfs; import org.springframework.beans.factory.annotation.Autowired; import java.util.List; import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.*; @@ -68,7 +78,7 @@ public class VfModuleCDSRequestProviderTest extends AbstractVnfCDSRequestProvide ResourceKey.VF_MODULE_ID); doReturn(getUserParams()).when(extractServiceFromUserParameters).getServiceFromRequestUserParams(anyList()); doCallRealMethod().when(configureInstanceParamsForVfModule).populateInstanceParams(any(), any(), anyString(), - anyString()); + anyString(), any()); // when vfModuleCDSRequestProvider.setExecutionObject(buildingBlockExecution); @@ -105,7 +115,7 @@ public class VfModuleCDSRequestProviderTest extends AbstractVnfCDSRequestProvide ResourceKey.VF_MODULE_ID); doReturn(getUserParams()).when(extractServiceFromUserParameters).getServiceFromRequestUserParams(anyList()); doCallRealMethod().when(configureInstanceParamsForVfModule).populateInstanceParams(any(), any(), anyString(), - anyString()); + anyString(), any()); vfModuleCDSRequestProvider.setExecutionObject(buildingBlockExecution); String payload = vfModuleCDSRequestProvider.buildRequestPayload(DEPLOY_ACTION).get(); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/VnfCDSRequestProviderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/VnfCDSRequestProviderTest.java index 7aafd900d4..e801c2afab 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/VnfCDSRequestProviderTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/cds/VnfCDSRequestProviderTest.java @@ -50,8 +50,6 @@ public class VnfCDSRequestProviderTest extends AbstractVnfCDSRequestProviderTest ResourceKey.SERVICE_INSTANCE_ID); doReturn(createGenericVnf()).when(extractPojosForBB).extractByKey(buildingBlockExecution, ResourceKey.GENERIC_VNF_ID); - doNothing().when(configureInstanceParamsForVnf).populateInstanceParams(any(), any(), anyString()); - // when vnfCDSRequestProvider.setExecutionObject(buildingBlockExecution); String payload = vnfCDSRequestProvider.buildRequestPayload(ASSIGN_ACTION).get(); @@ -81,7 +79,6 @@ public class VnfCDSRequestProviderTest extends AbstractVnfCDSRequestProviderTest ResourceKey.SERVICE_INSTANCE_ID); doReturn(createGenericVnf()).when(extractPojosForBB).extractByKey(buildingBlockExecution, ResourceKey.GENERIC_VNF_ID); - doNothing().when(configureInstanceParamsForVnf).populateInstanceParams(any(), any(), any()); // when vnfCDSRequestProvider.setExecutionObject(buildingBlockExecution); |