}
 
     public Optional<ServiceInstance> getAAIServiceInstanceByName(String globalCustomerId, String serviceType,
-            String serviceInstanceName) throws Exception {
+            String serviceInstanceName) throws MultipleObjectsFoundException {
         ServiceInstance aaiServiceInstance = null;
         ServiceInstances aaiServiceInstances = null;
         aaiServiceInstances = getAAIServiceInstancesByName(globalCustomerId, serviceType, serviceInstanceName);
         if (aaiServiceInstances == null) {
             return Optional.empty();
         } else if (aaiServiceInstances.getServiceInstance().size() > 1) {
-            throw new Exception("Multiple Service Instances Returned");
+            String message = String.format(
+                    "Multiple service instances found for customer-id: %s, service-type: %s and service-instance-name: %s.",
+                    globalCustomerId, serviceType, serviceInstanceName);
+            throw new MultipleObjectsFoundException(message);
         } else {
             aaiServiceInstance = aaiServiceInstances.getServiceInstance().get(0);
         }
             if (serviceInstances.get().getServiceInstance().isEmpty()) {
                 throw new NoServiceInstanceFoundException("No ServiceInstances Returned");
             } else if (serviceInstances.get().getServiceInstance().size() > 1) {
-                throw new MultipleObjectsFoundException("Multiple ServiceInstances Returned");
+                String message = String.format("Mulitple service instances were found for instance-group-id: %s.",
+                        instanceGroupId);
+                throw new MultipleObjectsFoundException(message);
             } else {
                 serviceInstance = serviceInstances.get().getServiceInstance().get(0);
             }
     }
 
     public Optional<L3Network> getRelatedNetworkByNameFromServiceInstance(String serviceInstanceId, String networkName)
-            throws Exception {
+            throws MultipleObjectsFoundException {
         AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
         uri.relatedTo(AAIObjectPlurals.L3_NETWORK).queryParam("network-name", networkName);
         Optional<L3Networks> networks = injectionHelper.getAaiClient().get(L3Networks.class, uri);
             return Optional.empty();
         } else {
             if (networks.get().getL3Network().size() > 1) {
-                throw new Exception("Multiple Networks Returned");
+                String message =
+                        String.format("Multiple networks found for service-instance-id: %s and network-name: %s.",
+                                serviceInstanceId, networkName);
+                throw new MultipleObjectsFoundException(message);
             } else {
                 network = networks.get().getL3Network().get(0);
             }
     }
 
     public Optional<GenericVnf> getRelatedVnfByNameFromServiceInstance(String serviceInstanceId, String vnfName)
-            throws Exception {
+            throws MultipleObjectsFoundException {
         AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
         uri.relatedTo(AAIObjectPlurals.GENERIC_VNF).queryParam("vnf-name", vnfName);
         Optional<GenericVnfs> vnfs = injectionHelper.getAaiClient().get(GenericVnfs.class, uri);
             return Optional.empty();
         } else {
             if (vnfs.get().getGenericVnf().size() > 1) {
-                throw new Exception("Multiple Vnfs Returned");
+                String message = String.format("Multiple vnfs found for service-instance-id: %s and vnf-name: %s.",
+                        serviceInstanceId, vnfName);
+                throw new MultipleObjectsFoundException(message);
             } else {
                 vnf = vnfs.get().getGenericVnf().get(0);
             }
     }
 
     public Optional<VolumeGroup> getRelatedVolumeGroupByNameFromVnf(String vnfId, String volumeGroupName)
-            throws Exception {
+            throws MultipleObjectsFoundException {
         AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId);
         uri.relatedTo(AAIObjectPlurals.VOLUME_GROUP).queryParam("volume-group-name", volumeGroupName);
         Optional<VolumeGroups> volumeGroups = injectionHelper.getAaiClient().get(VolumeGroups.class, uri);
             return Optional.empty();
         } else {
             if (volumeGroups.get().getVolumeGroup().size() > 1) {
-                throw new Exception("Multiple VolumeGroups Returned");
+                String message = String.format("Multiple volume-groups found for vnf-id: %s and volume-group-name: %s.",
+                        vnfId, volumeGroupName);
+                throw new MultipleObjectsFoundException(message);
             } else {
                 volumeGroup = volumeGroups.get().getVolumeGroup().get(0);
             }
     }
 
     public Optional<VolumeGroup> getRelatedVolumeGroupByNameFromVfModule(String vnfId, String vfModuleId,
-            String volumeGroupName) throws Exception {
+            String volumeGroupName) throws MultipleObjectsFoundException {
         AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId);
         uri.relatedTo(AAIObjectPlurals.VOLUME_GROUP).queryParam("volume-group-name", volumeGroupName);
         Optional<VolumeGroups> volumeGroups = injectionHelper.getAaiClient().get(VolumeGroups.class, uri);
             return Optional.empty();
         } else {
             if (volumeGroups.get().getVolumeGroup().size() > 1) {
-                throw new Exception("Multiple VolumeGroups Returned");
+                String message = String.format(
+                        "Multiple voulme-groups found for vnf-id: %s, vf-module-id: %s and volume-group-name: %s.",
+                        vnfId, vfModuleId, volumeGroupName);
+                throw new MultipleObjectsFoundException(message);
             } else {
                 volumeGroup = volumeGroups.get().getVolumeGroup().get(0);
             }
     }
 
     public Optional<Configuration> getRelatedConfigurationByNameFromServiceInstance(String serviceInstanceId,
-            String configurationName) throws Exception {
+            String configurationName) throws MultipleObjectsFoundException {
         AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId);
         uri.relatedTo(AAIObjectPlurals.CONFIGURATION).queryParam("configuration-name", configurationName);
         Optional<Configurations> configurations = injectionHelper.getAaiClient().get(Configurations.class, uri);
             return Optional.empty();
         } else {
             if (configurations.get().getConfiguration().size() > 1) {
-                throw new Exception("Multiple Configurations Returned");
+                String message = String.format(
+                        "Multiple configurations found for service-instance-d: %s and configuration-name: %s.",
+                        serviceInstanceId, configurationName);
+                throw new MultipleObjectsFoundException(message);
             } else {
                 configuration = configurations.get().getConfiguration().get(0);
             }
 
 
 import static com.shazam.shazamcrest.MatcherAssert.assertThat;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.CoreMatchers.containsString;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 import static org.mockito.ArgumentMatchers.any;
 
     @Test
     public void testGetOptionalAAIServiceInstanceByNameException() throws Exception {
-        expectedException.expect(Exception.class);
+        expectedException.expect(MultipleObjectsFoundException.class);
+        expectedException.expectMessage(containsString(
+                "Multiple service instances found for customer-id: globalCustomerId, service-type: serviceType and service-instance-name: serviceInstanceId."));
 
         String globalCustomerId = "globalCustomerId";
         String serviceType = "serviceType";
 
     @Test
     public void getRelatedNetworkByNameFromServiceInstanceMultipleNetworksExceptionTest() throws Exception {
-        expectedException.expect(Exception.class);
+        expectedException.expect(MultipleObjectsFoundException.class);
+        expectedException.expectMessage(containsString(
+                "Multiple networks found for service-instance-id: serviceInstanceId and network-name: networkName."));
 
         String serviceInstanceId = "serviceInstanceId";
         String networkName = "networkName";
         network.setNetworkId("id123");
         network.setNetworkName("name123");
 
-        L3Networks expected = new L3Networks();
-        expected.getL3Network().add(network);
-        expected.getL3Network().add(network);
+        L3Networks l3Networks = new L3Networks();
+        l3Networks.getL3Network().add(network);
+        l3Networks.getL3Network().add(network);
+        Optional<L3Networks> optNetworks = Optional.of(l3Networks);
 
-        doReturn(expected).when(MOCK_aaiResourcesClient).get(eq(L3Networks.class), any(AAIResourceUri.class));
+        doReturn(optNetworks).when(MOCK_aaiResourcesClient).get(eq(L3Networks.class), any(AAIResourceUri.class));
 
         bbInputSetupUtils.getRelatedNetworkByNameFromServiceInstance(serviceInstanceId, networkName);
     }
 
     @Test
     public void getRelatedVnfByNameFromServiceInstanceMultipleVnfsExceptionTest() throws Exception {
-        expectedException.expect(Exception.class);
+        expectedException.expect(MultipleObjectsFoundException.class);
+        expectedException.expectMessage(containsString(
+                "Multiple vnfs found for service-instance-id: serviceInstanceId and vnf-name: vnfName."));
 
         String serviceInstanceId = "serviceInstanceId";
         String vnfName = "vnfName";
         vnf.setVnfId("id123");
         vnf.setVnfName("name123");
 
-        GenericVnfs expectedVnf = new GenericVnfs();
-        expectedVnf.getGenericVnf().add(vnf);
-        expectedVnf.getGenericVnf().add(vnf);
+        GenericVnfs vnfs = new GenericVnfs();
+        vnfs.getGenericVnf().add(vnf);
+        vnfs.getGenericVnf().add(vnf);
+
+        Optional<GenericVnfs> optVnfs = Optional.of(vnfs);
 
-        doReturn(expectedVnf).when(MOCK_aaiResourcesClient).get(eq(GenericVnfs.class), any(AAIResourceUri.class));
+        doReturn(optVnfs).when(MOCK_aaiResourcesClient).get(eq(GenericVnfs.class), any(AAIResourceUri.class));
 
         bbInputSetupUtils.getRelatedVnfByNameFromServiceInstance(serviceInstanceId, vnfName);
     }
 
     @Test
     public void getRelatedVolumeGroupByNameFromVnfMultipleVolumeGroupsExceptionTest() throws Exception {
-        expectedException.expect(Exception.class);
+        expectedException.expect(MultipleObjectsFoundException.class);
+        expectedException.expectMessage(containsString(
+                "Multiple volume-groups found for vnf-id: vnfId and volume-group-name: volumeGroupName."));
+
 
         String vnfId = "vnfId";
         String volumeGroupName = "volumeGroupName";
         volumeGroup.setVolumeGroupId("id123");
         volumeGroup.setVolumeGroupName("name123");
 
-        VolumeGroups expectedVolumeGroup = new VolumeGroups();
-        expectedVolumeGroup.getVolumeGroup().add(volumeGroup);
-        expectedVolumeGroup.getVolumeGroup().add(volumeGroup);
+        VolumeGroups volumeGroups = new VolumeGroups();
+        volumeGroups.getVolumeGroup().add(volumeGroup);
+        volumeGroups.getVolumeGroup().add(volumeGroup);
+        Optional<VolumeGroups> optVolumeGroups = Optional.of(volumeGroups);
 
-        doReturn(expectedVolumeGroup).when(MOCK_aaiResourcesClient).get(eq(VolumeGroups.class),
-                any(AAIResourceUri.class));
+        doReturn(optVolumeGroups).when(MOCK_aaiResourcesClient).get(eq(VolumeGroups.class), any(AAIResourceUri.class));
 
         bbInputSetupUtils.getRelatedVolumeGroupByNameFromVnf(vnfId, volumeGroupName);
     }
 
     @Test
     public void getRelatedVolumeGroupByNameFromVfModuleMultipleVolumeGroupsExceptionTest() throws Exception {
-        expectedException.expect(Exception.class);
-
+        expectedException.expect(MultipleObjectsFoundException.class);
+        expectedException.expectMessage(containsString(
+                "Multiple voulme-groups found for vnf-id: vnfId, vf-module-id: volumeGroupId and volume-group-name: volumeGroupName."));
         String vnfId = "vnfId";
         String volumeGroupId = "volumeGroupId";
         String volumeGroupName = "volumeGroupName";
         volumeGroup.setVolumeGroupId("id123");
         volumeGroup.setVolumeGroupName("name123");
 
-        VolumeGroups expectedVolumeGroup = new VolumeGroups();
-        expectedVolumeGroup.getVolumeGroup().add(volumeGroup);
-        expectedVolumeGroup.getVolumeGroup().add(volumeGroup);
+        VolumeGroups volumeGroups = new VolumeGroups();
+        volumeGroups.getVolumeGroup().add(volumeGroup);
+        volumeGroups.getVolumeGroup().add(volumeGroup);
 
-        doReturn(expectedVolumeGroup).when(MOCK_aaiResourcesClient).get(eq(VolumeGroups.class),
-                any(AAIResourceUri.class));
+        Optional<VolumeGroups> optVolumeGroups = Optional.of(volumeGroups);
+
+        doReturn(optVolumeGroups).when(MOCK_aaiResourcesClient).get(eq(VolumeGroups.class), any(AAIResourceUri.class));
 
         bbInputSetupUtils.getRelatedVolumeGroupByNameFromVfModule(vnfId, volumeGroupId, volumeGroupName);
     }
         assertEquals(expectedFlowsToExecute.size(), flowsToExecute.size());
     }
 
+    @Test
+    public void getRelatedConfigurationByNameFromServiceInstanceExceptionTest() throws Exception {
+        Configuration configuration = new Configuration();
+        configuration.setConfigurationId("id123");
+
+        Configurations configurations = new Configurations();
+        configurations.getConfiguration().add(configuration);
+        configurations.getConfiguration().add(configuration);
+
+        Optional<Configurations> optConfigurations = Optional.of(configurations);
+
+        doReturn(optConfigurations).when(MOCK_aaiResourcesClient).get(eq(Configurations.class),
+                any(AAIResourceUri.class));
+
+        expectedException.expect(MultipleObjectsFoundException.class);
+        this.bbInputSetupUtils.getRelatedConfigurationByNameFromServiceInstance("id123", "name123");
+    }
+
+    @Test
+    public void getRelatedConfigurationByNameFromServiceInstanceNotFoundTest() throws Exception {
+        doReturn(Optional.empty()).when(MOCK_aaiResourcesClient).get(eq(Configurations.class),
+                any(AAIResourceUri.class));
+        Optional<Configuration> actualConfiguration =
+                bbInputSetupUtils.getRelatedConfigurationByNameFromServiceInstance("id123", "name123");
+        assertEquals(actualConfiguration, Optional.empty());
+    }
+
     @Test
     public void getRelatedConfigurationByNameFromServiceInstanceTest() throws Exception {
         Optional<Configurations> expected = Optional.of(new Configurations());
 
 import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup;
 import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
 import org.onap.so.bpmn.servicedecomposition.tasks.exceptions.DuplicateNameException;
+import org.onap.so.bpmn.servicedecomposition.tasks.exceptions.MultipleObjectsFoundException;
 import org.onap.so.client.aai.AAICommonObjectMapperProvider;
 import org.onap.so.client.aai.AAIObjectType;
 import org.onap.so.client.aai.entities.AAIResultWrapper;
             RequestDetails reqDetails, WorkflowResourceIds workflowResourceIds) throws Exception {
         try {
             if ("SERVICE".equalsIgnoreCase(type.toString())) {
-                // Service name verification based upon name + model-version-id
-                // + service-type + global-customer-id per requirements
-                String globalCustomerId = reqDetails.getSubscriberInfo().getGlobalSubscriberId();
-                String serviceType = reqDetails.getRequestParameters().getSubscriptionServiceType();
-                if (instanceName != null) {
-                    Optional<ServiceInstance> serviceInstanceAAI =
-                            bbInputSetupUtils.getAAIServiceInstanceByName(globalCustomerId, serviceType, instanceName);
-                    if (serviceInstanceAAI.isPresent()) {
-                        if (serviceInstanceAAI.get().getModelVersionId()
-                                .equalsIgnoreCase(reqDetails.getModelInfo().getModelVersionId())) {
-                            return serviceInstanceAAI.get().getServiceInstanceId();
-                        } else {
-                            throw new DuplicateNameException(SERVICE_INSTANCE,
-                                    String.format(NAME_EXISTS_WITH_DIFF_VERSION_ID, instanceName,
-                                            reqDetails.getModelInfo().getModelVersionId()));
-                        }
-                    } else {
-                        ServiceInstances aaiServiceInstances =
-                                bbInputSetupUtils.getAAIServiceInstancesGloballyByName(instanceName);
-                        if (aaiServiceInstances != null) {
-                            if (aaiServiceInstances.getServiceInstance() != null
-                                    && !aaiServiceInstances.getServiceInstance().isEmpty()) {
-                                if (aaiServiceInstances.getServiceInstance().size() > 1) {
-                                    throw new DuplicateNameException(SERVICE_INSTANCE,
-                                            String.format(NAME_EXISTS_MULTIPLE, instanceName));
-                                } else {
-                                    ServiceInstance si =
-                                            aaiServiceInstances.getServiceInstance().stream().findFirst().get();
-                                    Map<String, String> keys =
-                                            bbInputSetupUtils.getURIKeysFromServiceInstance(si.getServiceInstanceId());
-
-                                    throw new DuplicateNameException(SERVICE_INSTANCE,
-                                            String.format(NAME_EXISTS_WITH_DIFF_COMBINATION, instanceName,
-                                                    keys.get("global-customer-id"), keys.get("service-type"),
-                                                    si.getModelVersionId()));
-                                }
-                            }
-                        }
-                    }
-                }
+                return validateServiceResourceIdInAAI(generatedResourceId, instanceName, reqDetails);
             } else if ("NETWORK".equalsIgnoreCase(type.toString())) {
-                Optional<L3Network> network = bbInputSetupUtils.getRelatedNetworkByNameFromServiceInstance(
-                        workflowResourceIds.getServiceInstanceId(), instanceName);
-                if (network.isPresent()) {
-                    if (network.get().getModelCustomizationId()
-                            .equalsIgnoreCase(reqDetails.getModelInfo().getModelCustomizationId())) {
-                        return network.get().getNetworkId();
-                    } else {
-                        throw new DuplicateNameException("l3Network",
-                                String.format(NAME_EXISTS_WITH_DIFF_CUSTOMIZATION_ID, instanceName,
-                                        network.get().getModelCustomizationId()));
-                    }
-                }
-
-                if (bbInputSetupUtils.existsAAINetworksGloballyByName(instanceName)) {
-                    throw new DuplicateNameException("l3Network", String.format(NAME_EXISTS_WITH_DIFF_PARENT,
-                            instanceName, workflowResourceIds.getServiceInstanceId()));
-                }
-
+                return validateNetworkResourceIdInAAI(generatedResourceId, instanceName, reqDetails,
+                        workflowResourceIds);
             } else if ("VNF".equalsIgnoreCase(type.toString())) {
-                Optional<GenericVnf> vnf = bbInputSetupUtils.getRelatedVnfByNameFromServiceInstance(
-                        workflowResourceIds.getServiceInstanceId(), instanceName);
-                if (vnf.isPresent()) {
-                    if (vnf.get().getModelCustomizationId()
-                            .equalsIgnoreCase(reqDetails.getModelInfo().getModelCustomizationId())) {
-                        return vnf.get().getVnfId();
-                    } else {
-                        throw new DuplicateNameException("generic-vnf",
-                                String.format(NAME_EXISTS_WITH_DIFF_CUSTOMIZATION_ID, instanceName,
-                                        vnf.get().getModelCustomizationId()));
-                    }
-                }
-                GenericVnfs vnfs = bbInputSetupUtils.getAAIVnfsGloballyByName(instanceName);
-                if (vnfs != null) {
-                    throw new DuplicateNameException("generic-vnf", String.format(NAME_EXISTS_WITH_DIFF_PARENT,
-                            instanceName, vnfs.getGenericVnf().get(0).getVnfId()));
-                }
+                return validateVnfResourceIdInAAI(generatedResourceId, instanceName, reqDetails, workflowResourceIds);
             } else if ("VFMODULE".equalsIgnoreCase(type.toString())) {
-                GenericVnf vnf = bbInputSetupUtils.getAAIGenericVnf(workflowResourceIds.getVnfId());
-                if (vnf != null && vnf.getVfModules() != null) {
-                    for (org.onap.aai.domain.yang.VfModule vfModule : vnf.getVfModules().getVfModule()) {
-                        if (vfModule.getVfModuleName().equalsIgnoreCase(instanceName)) {
-                            if (vfModule.getModelCustomizationId()
-                                    .equalsIgnoreCase(reqDetails.getModelInfo().getModelCustomizationId())) {
-                                return vfModule.getVfModuleId();
-                            } else {
-                                throw new DuplicateNameException("vfModule",
-                                        String.format(NAME_EXISTS_WITH_DIFF_CUSTOMIZATION_ID, instanceName,
-                                                reqDetails.getModelInfo().getModelCustomizationId()));
-                            }
-                        }
-                    }
-                }
-                if (bbInputSetupUtils.existsAAIVfModuleGloballyByName(instanceName)) {
-                    throw new DuplicateNameException("vfModule", instanceName);
-                }
+                return validateVfModuleResourceIdInAAI(generatedResourceId, instanceName, reqDetails,
+                        workflowResourceIds);
             } else if ("VOLUMEGROUP".equalsIgnoreCase(type.toString())) {
-                GenericVnf vnf = bbInputSetupUtils.getAAIGenericVnf(workflowResourceIds.getVnfId());
-                Optional<VolumeGroup> volumeGroup = bbInputSetupUtils
-                        .getRelatedVolumeGroupByNameFromVnf(workflowResourceIds.getVnfId(), instanceName);
-                if (volumeGroup.isPresent()) {
-                    if (volumeGroup.get().getVfModuleModelCustomizationId()
-                            .equalsIgnoreCase(reqDetails.getModelInfo().getModelCustomizationId())) {
-                        return volumeGroup.get().getVolumeGroupId();
-                    } else {
-                        throw new DuplicateNameException("volumeGroup", volumeGroup.get().getVolumeGroupName());
-                    }
-                }
-                if (vnf != null && vnf.getVfModules() != null) {
-                    for (org.onap.aai.domain.yang.VfModule vfModule : vnf.getVfModules().getVfModule()) {
-                        Optional<VolumeGroup> volumeGroupFromVfModule =
-                                bbInputSetupUtils.getRelatedVolumeGroupByNameFromVfModule(vnf.getVnfId(),
-                                        vfModule.getVfModuleId(), instanceName);
-                        if (volumeGroupFromVfModule.isPresent()) {
-                            if (volumeGroupFromVfModule.get().getVfModuleModelCustomizationId()
-                                    .equalsIgnoreCase(reqDetails.getModelInfo().getModelCustomizationId())) {
-                                return volumeGroupFromVfModule.get().getVolumeGroupId();
-                            } else {
-                                throw new DuplicateNameException("volumeGroup",
-                                        String.format(NAME_EXISTS_WITH_DIFF_CUSTOMIZATION_ID, instanceName,
-                                                volumeGroupFromVfModule.get().getModelCustomizationId()));
-                            }
-                        }
-                    }
-                }
-                if (bbInputSetupUtils.existsAAIVolumeGroupGloballyByName(instanceName)) {
-                    throw new DuplicateNameException("volumeGroup", instanceName);
-                }
+                return validateVolumeGroupResourceIdInAAI(generatedResourceId, instanceName, reqDetails,
+                        workflowResourceIds);
             } else if ("CONFIGURATION".equalsIgnoreCase(type.toString())) {
-                Optional<org.onap.aai.domain.yang.Configuration> configuration =
-                        bbInputSetupUtils.getRelatedConfigurationByNameFromServiceInstance(
-                                workflowResourceIds.getServiceInstanceId(), instanceName);
-                if (configuration.isPresent()) {
-                    if (configuration.get().getModelCustomizationId()
-                            .equalsIgnoreCase(reqDetails.getModelInfo().getModelCustomizationId())) {
-                        return configuration.get().getConfigurationId();
-                    } else {
-                        throw new DuplicateNameException("configuration",
-                                String.format(NAME_EXISTS_WITH_DIFF_CUSTOMIZATION_ID, instanceName,
-                                        configuration.get().getConfigurationId()));
-                    }
-                }
-                if (bbInputSetupUtils.existsAAIConfigurationGloballyByName(instanceName)) {
-                    throw new DuplicateNameException("configuration", instanceName);
-                }
+                return validateConfigurationResourceIdInAAI(generatedResourceId, instanceName, reqDetails,
+                        workflowResourceIds);
             }
             return generatedResourceId;
         } catch (DuplicateNameException dne) {
                 && (serviceInstanceId != null && serviceInstanceId.trim().length() > 1)
                 && (bbInputSetupUtils.getAAIServiceInstanceById(serviceInstanceId) != null));
     }
+
+    protected String validateServiceResourceIdInAAI(String generatedResourceId, String instanceName,
+            RequestDetails reqDetails) throws DuplicateNameException, MultipleObjectsFoundException {
+        String globalCustomerId = reqDetails.getSubscriberInfo().getGlobalSubscriberId();
+        String serviceType = reqDetails.getRequestParameters().getSubscriptionServiceType();
+        if (instanceName != null) {
+            Optional<ServiceInstance> serviceInstanceAAI =
+                    bbInputSetupUtils.getAAIServiceInstanceByName(globalCustomerId, serviceType, instanceName);
+            if (serviceInstanceAAI.isPresent()) {
+                if (serviceInstanceAAI.get().getModelVersionId()
+                        .equalsIgnoreCase(reqDetails.getModelInfo().getModelVersionId())) {
+                    return serviceInstanceAAI.get().getServiceInstanceId();
+                } else {
+                    throw new DuplicateNameException(SERVICE_INSTANCE, String.format(NAME_EXISTS_WITH_DIFF_VERSION_ID,
+                            instanceName, reqDetails.getModelInfo().getModelVersionId()));
+                }
+            } else {
+                ServiceInstances aaiServiceInstances =
+                        bbInputSetupUtils.getAAIServiceInstancesGloballyByName(instanceName);
+                if (aaiServiceInstances != null) {
+                    if (aaiServiceInstances.getServiceInstance() != null
+                            && !aaiServiceInstances.getServiceInstance().isEmpty()) {
+                        if (aaiServiceInstances.getServiceInstance().size() > 1) {
+                            throw new DuplicateNameException(SERVICE_INSTANCE,
+                                    String.format(NAME_EXISTS_MULTIPLE, instanceName));
+                        } else {
+                            ServiceInstance si = aaiServiceInstances.getServiceInstance().stream().findFirst().get();
+                            Map<String, String> keys =
+                                    bbInputSetupUtils.getURIKeysFromServiceInstance(si.getServiceInstanceId());
+
+                            throw new DuplicateNameException(SERVICE_INSTANCE,
+                                    String.format(NAME_EXISTS_WITH_DIFF_COMBINATION, instanceName,
+                                            keys.get("global-customer-id"), keys.get("service-type"),
+                                            si.getModelVersionId()));
+                        }
+                    }
+                }
+            }
+        }
+        return generatedResourceId;
+    }
+
+    protected String validateNetworkResourceIdInAAI(String generatedResourceId, String instanceName,
+            RequestDetails reqDetails, WorkflowResourceIds workflowResourceIds)
+            throws DuplicateNameException, MultipleObjectsFoundException {
+        Optional<L3Network> network = bbInputSetupUtils
+                .getRelatedNetworkByNameFromServiceInstance(workflowResourceIds.getServiceInstanceId(), instanceName);
+        if (network.isPresent()) {
+            if (network.get().getModelCustomizationId()
+                    .equalsIgnoreCase(reqDetails.getModelInfo().getModelCustomizationId())) {
+                return network.get().getNetworkId();
+            } else {
+                throw new DuplicateNameException("l3Network", String.format(NAME_EXISTS_WITH_DIFF_CUSTOMIZATION_ID,
+                        instanceName, network.get().getModelCustomizationId()));
+            }
+        }
+        if (bbInputSetupUtils.existsAAINetworksGloballyByName(instanceName)) {
+            throw new DuplicateNameException("l3Network", String.format(NAME_EXISTS_WITH_DIFF_PARENT, instanceName,
+                    workflowResourceIds.getServiceInstanceId()));
+        }
+        return generatedResourceId;
+    }
+
+    protected String validateVnfResourceIdInAAI(String generatedResourceId, String instanceName,
+            RequestDetails reqDetails, WorkflowResourceIds workflowResourceIds)
+            throws DuplicateNameException, MultipleObjectsFoundException {
+        Optional<GenericVnf> vnf = bbInputSetupUtils
+                .getRelatedVnfByNameFromServiceInstance(workflowResourceIds.getServiceInstanceId(), instanceName);
+        if (vnf.isPresent()) {
+            if (vnf.get().getModelCustomizationId()
+                    .equalsIgnoreCase(reqDetails.getModelInfo().getModelCustomizationId())) {
+                return vnf.get().getVnfId();
+            } else {
+                throw new DuplicateNameException("generic-vnf", String.format(NAME_EXISTS_WITH_DIFF_CUSTOMIZATION_ID,
+                        instanceName, vnf.get().getModelCustomizationId()));
+            }
+        }
+        GenericVnfs vnfs = bbInputSetupUtils.getAAIVnfsGloballyByName(instanceName);
+        if (vnfs != null) {
+            throw new DuplicateNameException("generic-vnf",
+                    String.format(NAME_EXISTS_WITH_DIFF_PARENT, instanceName, vnfs.getGenericVnf().get(0).getVnfId()));
+        }
+        return generatedResourceId;
+    }
+
+    protected String validateVfModuleResourceIdInAAI(String generatedResourceId, String instanceName,
+            RequestDetails reqDetails, WorkflowResourceIds workflowResourceIds) throws DuplicateNameException {
+        GenericVnf vnf = bbInputSetupUtils.getAAIGenericVnf(workflowResourceIds.getVnfId());
+        if (vnf != null && vnf.getVfModules() != null) {
+            for (org.onap.aai.domain.yang.VfModule vfModule : vnf.getVfModules().getVfModule()) {
+                if (vfModule.getVfModuleName().equalsIgnoreCase(instanceName)) {
+                    if (vfModule.getModelCustomizationId()
+                            .equalsIgnoreCase(reqDetails.getModelInfo().getModelCustomizationId())) {
+                        return vfModule.getVfModuleId();
+                    } else {
+                        throw new DuplicateNameException("vfModule",
+                                String.format(NAME_EXISTS_WITH_DIFF_CUSTOMIZATION_ID, instanceName,
+                                        reqDetails.getModelInfo().getModelCustomizationId()));
+                    }
+                }
+            }
+        }
+        if (bbInputSetupUtils.existsAAIVfModuleGloballyByName(instanceName)) {
+            throw new DuplicateNameException("vfModule", instanceName);
+        }
+        return generatedResourceId;
+    }
+
+    protected String validateVolumeGroupResourceIdInAAI(String generatedResourceId, String instanceName,
+            RequestDetails reqDetails, WorkflowResourceIds workflowResourceIds)
+            throws DuplicateNameException, MultipleObjectsFoundException {
+        Optional<VolumeGroup> volumeGroup =
+                bbInputSetupUtils.getRelatedVolumeGroupByNameFromVnf(workflowResourceIds.getVnfId(), instanceName);
+        if (volumeGroup.isPresent()) {
+            if (volumeGroup.get().getVfModuleModelCustomizationId()
+                    .equalsIgnoreCase(reqDetails.getModelInfo().getModelCustomizationId())) {
+                return volumeGroup.get().getVolumeGroupId();
+            } else {
+                throw new DuplicateNameException("volumeGroup", volumeGroup.get().getVolumeGroupName());
+            }
+        }
+        if (bbInputSetupUtils.existsAAIVolumeGroupGloballyByName(instanceName)) {
+            throw new DuplicateNameException("volumeGroup", instanceName);
+        }
+        return generatedResourceId;
+    }
+
+    protected String validateConfigurationResourceIdInAAI(String generatedResourceId, String instanceName,
+            RequestDetails reqDetails, WorkflowResourceIds workflowResourceIds)
+            throws DuplicateNameException, MultipleObjectsFoundException {
+        Optional<org.onap.aai.domain.yang.Configuration> configuration =
+                bbInputSetupUtils.getRelatedConfigurationByNameFromServiceInstance(
+                        workflowResourceIds.getServiceInstanceId(), instanceName);
+        if (configuration.isPresent()) {
+            if (configuration.get().getModelCustomizationId()
+                    .equalsIgnoreCase(reqDetails.getModelInfo().getModelCustomizationId())) {
+                return configuration.get().getConfigurationId();
+            } else {
+                throw new DuplicateNameException("configuration", String.format(NAME_EXISTS_WITH_DIFF_CUSTOMIZATION_ID,
+                        instanceName, configuration.get().getConfigurationId()));
+            }
+        }
+        if (bbInputSetupUtils.existsAAIConfigurationGloballyByName(instanceName)) {
+            throw new DuplicateNameException("configuration", instanceName);
+        }
+        return generatedResourceId;
+    }
 }
 
 
     }
 
     @Test
-    public void validateVnfResourceIdInAAITest() throws Exception {
+    public void validateResourceIdInAAIVnfTest() throws Exception {
         RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
         WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
         workflowResourceIds.setServiceInstanceId("siId123");
     }
 
     @Test
-    public void validateVnfResourceNameInAAITest() throws Exception {
+    public void validateResourceIdInAAIVnfNotGloballyUniqueTest() throws Exception {
         RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
         WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
         workflowResourceIds.setServiceInstanceId("siId123");
     }
 
     @Test
-    public void validateNetworkResourceIdInAAITest() throws Exception {
+    public void validateResourceIdInAAINetworkTest() throws Exception {
         RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
         WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
         workflowResourceIds.setServiceInstanceId("siId123");
     }
 
     @Test
-    public void validateVfModuleResourceIdInAAITest() throws Exception {
+    public void validateResourceIdInAAIVfModuleTest() throws Exception {
         RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
         WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
         workflowResourceIds.setServiceInstanceId("siId123");
     }
 
     @Test
-    public void validateVfModuleResourceIdInAAINotGloballyUniqueTest() throws Exception {
+    public void validateResourceIdInAAIVfModuleNotGloballyUniqueTest() throws Exception {
         RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
         WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
         workflowResourceIds.setVnfId("id111");
     }
 
     @Test
-    public void validateVolumeGroupResourceIdInAAITest() throws Exception {
+    public void validateResourceIdInAAIVolumeGroupTest() throws Exception {
         RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
         WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
         workflowResourceIds.setServiceInstanceId("siId123");
     }
 
     @Test
-    public void validateVolumeGroupResourceIdInAAINotGloballyUniqueTest() throws Exception {
+    public void validatesourceIdInAAIVolumeGroupNotGloballyUniqueTest() throws Exception {
         RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
         WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
         workflowResourceIds.setVnfId("id123");
     }
 
     @Test
-    public void validateConfigurationResourceIdInAAITest() throws Exception {
+    public void validateResourceIdInAAIConfigurationTest() throws Exception {
         RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
         WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
         workflowResourceIds.setServiceInstanceId("siId123");
     }
 
     @Test
-    public void validateConfigurationResourceIdInAAINotGloballyUniqueTest() throws Exception {
+    public void validateResourceIdInAAIConfigurationNotGloballyUniqueTest() throws Exception {
         RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
         WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
         workflowResourceIds.setServiceInstanceId("siId123");
     }
 
     @Test
-    public void validateServiceInstanceResourceIdInAAITest() throws Exception {
+    public void validateResourceIdInAAISITest() throws Exception {
         WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
         workflowResourceIds.setServiceInstanceId("siId123");
         RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
     }
 
     @Test
-    public void validateServiceInstanceResourceIdInAAIMultipleTest() throws Exception {
+    public void validateResourceIdInAAIMultipleSITest() throws Exception {
         WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
         workflowResourceIds.setServiceInstanceId("siId123");
         RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
     }
 
     @Test
-    public void validateServiceInstanceResourceIdInAAIExistsTest() throws Exception {
+    public void validateResourceIdInAAISIExistsTest() throws Exception {
         WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
         workflowResourceIds.setServiceInstanceId("siId123");
         RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
                 workflowResourceIds);
     }
 
+    @Test
+    public void validateServiceResourceIdInAAINoDupTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        reqDetails.getModelInfo().setModelVersionId("1234567");
+        when(bbSetupUtils.getAAIServiceInstanceByName("id123", "subServiceType123", "siName123"))
+                .thenReturn(Optional.empty());
+        when(bbSetupUtils.getAAIServiceInstancesGloballyByName("siName123")).thenReturn(null);
+        String id = workflowAction.validateServiceResourceIdInAAI("generatedId123", "siName123", reqDetails);
+        assertEquals("generatedId123", id);
+    }
+
+    @Test
+    public void validateServiceResourceIdInAAISameModelVersionId() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        reqDetails.getModelInfo().setModelVersionId("1234567");
+
+        ServiceInstance si = new ServiceInstance();
+        si.setServiceInstanceId("siId123");
+        si.setModelVersionId("1234567");
+        Optional<ServiceInstance> siOp = Optional.of(si);
+
+        when(bbSetupUtils.getAAIServiceInstanceByName("id123", "subServiceType123", "siName123")).thenReturn(siOp);
+        String id = workflowAction.validateServiceResourceIdInAAI("generatedId123", "siName123", reqDetails);
+        assertEquals("siId123", id);
+    }
+
+    @Test
+    public void validateServiceResourceIdInAAIDifferentModelVersionId() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        reqDetails.getModelInfo().setModelVersionId("1234567");
+
+        ServiceInstance si = new ServiceInstance();
+        si.setServiceInstanceId("siId123");
+        si.setModelVersionId("9999999");
+        ServiceInstances serviceInstances = new ServiceInstances();
+        serviceInstances.getServiceInstance().add(si);
+        Optional<ServiceInstance> siOp = Optional.of(si);
+
+        when(bbSetupUtils.getAAIServiceInstanceByName("id123", "subServiceType123", "siName123")).thenReturn(siOp);
+
+        this.expectedException.expect(DuplicateNameException.class);
+        this.expectedException.expectMessage(containsString(
+                "serviceInstance with name (siName123) and different version id (1234567) already exists. The name must be unique."));
+
+        String id = workflowAction.validateServiceResourceIdInAAI("generatedId123", "siName123", reqDetails);
+        assertEquals("siId123", id);
+    }
+
+    @Test
+    public void validateServiceResourceIdInAAIDuplicateNameTest() throws Exception {
+
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        reqDetails.getModelInfo().setModelVersionId("1234567");
+
+        ServiceInstance si = new ServiceInstance();
+        si.setServiceInstanceId("siId123");
+        si.setModelVersionId("1234567");
+
+        ServiceInstances serviceInstances = new ServiceInstances();
+        serviceInstances.getServiceInstance().add(si);
+
+        when(bbSetupUtils.getAAIServiceInstanceByName("id123", "subServiceType123", "siName"))
+                .thenReturn(Optional.empty());
+        when(bbSetupUtils.getAAIServiceInstancesGloballyByName("siName")).thenReturn(serviceInstances);
+
+        this.expectedException.expect(DuplicateNameException.class);
+        this.expectedException.expectMessage(containsString(
+                "serviceInstance with name (siName) and global-customer-id (null), service-type (null), model-version-id (1234567) already exists. The name must be unique."));
+
+        workflowAction.validateServiceResourceIdInAAI("generatedId123", "siName", reqDetails);
+    }
+
+    @Test
+    public void validateServiceResourceIdInAAIDuplicateNameMultipleTest() throws Exception {
+
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        reqDetails.getModelInfo().setModelVersionId("1234567");
+
+        ServiceInstance si = new ServiceInstance();
+        si.setServiceInstanceId("siId123");
+        si.setModelVersionId("1234567");
+
+        ServiceInstance si2 = new ServiceInstance();
+        si2.setServiceInstanceId("siId222");
+        si2.setModelVersionId("22222");
+        si2.setServiceInstanceName("siName222");
+
+        ServiceInstances serviceInstances = new ServiceInstances();
+        serviceInstances.getServiceInstance().add(si);
+        serviceInstances.getServiceInstance().add(si2);
+
+        when(bbSetupUtils.getAAIServiceInstanceByName("id123", "subServiceType123", "siName"))
+                .thenReturn(Optional.empty());
+        when(bbSetupUtils.getAAIServiceInstancesGloballyByName("siName")).thenReturn(serviceInstances);
+
+        this.expectedException.expect(DuplicateNameException.class);
+        this.expectedException.expectMessage(containsString(
+                "serviceInstance with name (siName) and multiple combination of model-version-id + service-type + global-customer-id already exists. The name must be unique."));
+
+        workflowAction.validateServiceResourceIdInAAI("generatedId123", "siName", reqDetails);
+    }
+
+    @Test
+    public void validateNetworkResourceIdInAAITest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+
+        when(bbSetupUtils.getRelatedNetworkByNameFromServiceInstance("siId123", "name123"))
+                .thenReturn(Optional.empty());
+        when(bbSetupUtils.existsAAINetworksGloballyByName("name123")).thenReturn(false);
+
+        String id = workflowAction.validateNetworkResourceIdInAAI("generatedId123", "name123", reqDetails,
+                workflowResourceIds);
+        assertEquals("generatedId123", id);
+    }
+
+    @Test
+    public void validateNetworkResourceIdInAAISameModelCustIdTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+
+        L3Network network = new L3Network();
+        network.setNetworkId("id123");
+        network.setNetworkName("name123");
+        network.setModelCustomizationId("1234567");
+        Optional<L3Network> opNetwork = Optional.of(network);
+
+        when(bbSetupUtils.getRelatedNetworkByNameFromServiceInstance("siId123", "name123")).thenReturn(opNetwork);
+
+        String id = workflowAction.validateNetworkResourceIdInAAI("generatedId123", "name123", reqDetails,
+                workflowResourceIds);
+        assertEquals("id123", id);
+    }
+
+    @Test
+    public void validateNetworkResourceIdInAAIDuplicateNameTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+
+        L3Network network = new L3Network();
+        network.setNetworkId("id123");
+        network.setNetworkName("name123");
+        network.setModelCustomizationId("9999999");
+        Optional<L3Network> opNetwork = Optional.of(network);
+
+        when(bbSetupUtils.getRelatedNetworkByNameFromServiceInstance("siId123", "name123")).thenReturn(opNetwork);
+
+        this.expectedException.expect(DuplicateNameException.class);
+        this.expectedException.expectMessage(containsString(
+                "l3Network with name (name123), same parent and different customization id (9999999) already exists. The name must be unique."));
+
+        workflowAction.validateNetworkResourceIdInAAI("generatedId123", "name123", reqDetails, workflowResourceIds);
+    }
+
+    @Test
+    public void validateNetworkResourceIdInAAINotGloballyUniqueTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+
+        when(bbSetupUtils.getRelatedNetworkByNameFromServiceInstance("siId123", "name123"))
+                .thenReturn(Optional.empty());
+        when(bbSetupUtils.existsAAINetworksGloballyByName("name123")).thenReturn(true);
+
+        this.expectedException.expect(DuplicateNameException.class);
+        this.expectedException.expectMessage(containsString(
+                "l3Network with name (name123) id (siId123) and different parent relationship already exists. The name must be unique."));
+
+        workflowAction.validateNetworkResourceIdInAAI("generatedId123", "name123", reqDetails, workflowResourceIds);
+    }
+
+    @Test
+    public void validateVnfResourceIdInAAITest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+        when(bbSetupUtils.getRelatedVnfByNameFromServiceInstance("siId123", "vnfName123")).thenReturn(Optional.empty());
+        String id = workflowAction.validateVnfResourceIdInAAI("generatedId123", "vnfName123", reqDetails,
+                workflowResourceIds);
+        assertEquals("generatedId123", id);
+    }
+
+    @Test
+    public void validateVnfResourceIdInAAISameModelCustomizationIdTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+
+        GenericVnf vnf = new GenericVnf();
+        vnf.setVnfId("id123");
+        vnf.setVnfName("vnfName123");
+        vnf.setModelCustomizationId("1234567");
+        Optional<GenericVnf> opVnf = Optional.of(vnf);
+
+        when(bbSetupUtils.getRelatedVnfByNameFromServiceInstance("siId123", "vnfName123")).thenReturn(opVnf);
+        String id = workflowAction.validateVnfResourceIdInAAI("generatedId123", "vnfName123", reqDetails,
+                workflowResourceIds);
+        assertEquals("id123", id);
+    }
+
+    @Test
+    public void validateVnfResourceIdInAAIDiffModelCustomizationIdTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+
+        GenericVnf vnf = new GenericVnf();
+        vnf.setVnfId("id123");
+        vnf.setVnfName("vnfName123");
+        vnf.setModelCustomizationId("9999999");
+        Optional<GenericVnf> opVnf = Optional.of(vnf);
+
+        when(bbSetupUtils.getRelatedVnfByNameFromServiceInstance("siId123", "vnfName123")).thenReturn(opVnf);
+
+        this.expectedException.expect(DuplicateNameException.class);
+        this.expectedException.expectMessage(containsString(
+                "generic-vnf with name (vnfName123), same parent and different customization id (9999999) already exists. The name must be unique."));
+
+        workflowAction.validateVnfResourceIdInAAI("generatedId123", "vnfName123", reqDetails, workflowResourceIds);
+    }
+
+    @Test
+    public void validateVnfResourceIdInAAINotGloballyUniqueTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+
+
+        GenericVnf vnf = new GenericVnf();
+        vnf.setVnfId("id123");
+        vnf.setVnfName("vnfName123");
+        GenericVnfs genericVnfs = new GenericVnfs();
+        genericVnfs.getGenericVnf().add(vnf);
+
+        when(bbSetupUtils.getRelatedVnfByNameFromServiceInstance("siId123", "vnfName123")).thenReturn(Optional.empty());
+        when(bbSetupUtils.getAAIVnfsGloballyByName("vnfName123")).thenReturn(genericVnfs);
+
+        this.expectedException.expect(DuplicateNameException.class);
+        this.expectedException.expectMessage(containsString(
+                "generic-vnf with name (vnfName123) id (id123) and different parent relationship already exists. The name must be unique."));
+
+        workflowAction.validateVnfResourceIdInAAI("generatedId123", "vnfName123", reqDetails, workflowResourceIds);
+    }
+
+    @Test
+    public void validateVfModuleResourceIdTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setVnfId("vnfId123");
+
+        when(bbSetupUtils.getAAIGenericVnf("id123")).thenReturn(null);
+        when(bbSetupUtils.existsAAIVfModuleGloballyByName("name123")).thenReturn(false);
+
+        String id = workflowAction.validateVfModuleResourceIdInAAI("generatedId123", "name123", reqDetails,
+                workflowResourceIds);
+        assertEquals("generatedId123", id);
+    }
+
+    @Test
+    public void validateVfModuleResourceIdSameModelCustIdTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setVnfId("vnfId123");
+
+        VfModules vfModules = new VfModules();
+        VfModule vfModule = new VfModule();
+        vfModule.setVfModuleId("id123");
+        vfModule.setVfModuleName("name123");
+        vfModule.setModelCustomizationId("1234567");
+        vfModules.getVfModule().add(vfModule);
+
+        GenericVnf vnf = new GenericVnf();
+        vnf.setVnfId("id123");
+        vnf.setVnfName("vnfName123");
+        vnf.setVfModules(vfModules);
+
+        when(bbSetupUtils.getAAIGenericVnf("vnfId123")).thenReturn(vnf);
+
+        String id = workflowAction.validateVfModuleResourceIdInAAI("generatedId123", "name123", reqDetails,
+                workflowResourceIds);
+        assertEquals("id123", id);
+    }
+
+    @Test
+    public void validateVfModuleResourceIdDifferentModelCustIdTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setVnfId("vnfId123");
+
+        VfModules vfModules = new VfModules();
+        VfModule vfModule = new VfModule();
+        vfModule.setVfModuleId("id123");
+        vfModule.setVfModuleName("name123");
+        vfModule.setModelCustomizationId("9999999");
+        vfModules.getVfModule().add(vfModule);
+
+        GenericVnf vnf = new GenericVnf();
+        vnf.setVnfId("id123");
+        vnf.setVnfName("vnfName123");
+        vnf.setVfModules(vfModules);
+
+        when(bbSetupUtils.getAAIGenericVnf("vnfId123")).thenReturn(vnf);
+
+        this.expectedException.expect(DuplicateNameException.class);
+        this.expectedException.expectMessage(containsString(
+                "vfModule with name (name123), same parent and different customization id (1234567) already exists. The name must be unique."));
+
+        workflowAction.validateVfModuleResourceIdInAAI("generatedId123", "name123", reqDetails, workflowResourceIds);
+
+    }
+
+    @Test
+    public void validateVfModuleResourceIdNotGloballyUniqueTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setVnfId("vnfId123");
+
+        when(bbSetupUtils.getAAIGenericVnf("id123")).thenReturn(null);
+        when(bbSetupUtils.existsAAIVfModuleGloballyByName("name123")).thenReturn(true);
+
+        this.expectedException.expect(DuplicateNameException.class);
+        this.expectedException
+                .expectMessage(containsString("vfModule with name name123 already exists. The name must be unique."));
+
+        workflowAction.validateVfModuleResourceIdInAAI("generatedId123", "name123", reqDetails, workflowResourceIds);
+    }
+
+    @Test
+    public void validateVolumeGroupResourceIdInAAITest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setVnfId("vnfId123");
+
+        when(bbSetupUtils.getRelatedVolumeGroupByNameFromVnf("id123", "name123")).thenReturn(Optional.empty());
+        when(bbSetupUtils.existsAAIVolumeGroupGloballyByName("name123")).thenReturn(false);
+
+        String id = workflowAction.validateVolumeGroupResourceIdInAAI("generatedId123", "name123", reqDetails,
+                workflowResourceIds);
+        assertEquals("generatedId123", id);
+    }
+
+    @Test
+    public void validateVolumeGroupResourceIdInAAISameModelCustIdTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+        workflowResourceIds.setVnfId("vnfId123");
+
+        VolumeGroup volumeGroup = new VolumeGroup();
+        volumeGroup.setVolumeGroupId("id123");
+        volumeGroup.setVolumeGroupName("name123");
+        volumeGroup.setVfModuleModelCustomizationId("1234567");
+
+        Optional<VolumeGroup> opVolumeGroup = Optional.of(volumeGroup);
+
+        when(bbSetupUtils.getRelatedVolumeGroupByNameFromVnf("vnfId123", "name123")).thenReturn(opVolumeGroup);
+        String id = workflowAction.validateResourceIdInAAI("generatedId123", WorkflowType.VOLUMEGROUP, "name123",
+                reqDetails, workflowResourceIds);
+
+        assertEquals("id123", id);
+    }
+
+    @Test
+    public void validateVolumeGroupResourceIdInAAIDifferentModelCustIdTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+        workflowResourceIds.setVnfId("vnfId123");
+
+        VolumeGroup volumeGroup = new VolumeGroup();
+        volumeGroup.setVolumeGroupId("id123");
+        volumeGroup.setVolumeGroupName("name123");
+        volumeGroup.setVfModuleModelCustomizationId("9999999");
+
+        Optional<VolumeGroup> opVolumeGroup = Optional.of(volumeGroup);
+
+        when(bbSetupUtils.getRelatedVolumeGroupByNameFromVnf("vnfId123", "name123")).thenReturn(opVolumeGroup);
+
+        this.expectedException.expect(DuplicateNameException.class);
+        this.expectedException.expectMessage(
+                containsString("volumeGroup with name name123 already exists. The name must be unique."));
+
+        workflowAction.validateResourceIdInAAI("generatedId123", WorkflowType.VOLUMEGROUP, "name123", reqDetails,
+                workflowResourceIds);
+    }
+
+    @Test
+    public void validateVolumeGroupResourceIdInAAINotGloballyUniqueTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setVnfId("vnfId123");
+
+        when(bbSetupUtils.getRelatedVolumeGroupByNameFromVnf("vnfId123", "name123")).thenReturn(Optional.empty());
+        when(bbSetupUtils.existsAAIVolumeGroupGloballyByName("name123")).thenReturn(true);
+
+        this.expectedException.expect(DuplicateNameException.class);
+        this.expectedException.expectMessage(
+                containsString("volumeGroup with name name123 already exists. The name must be unique."));
+
+        workflowAction.validateResourceIdInAAI("generatedId123", WorkflowType.VOLUMEGROUP, "name123", reqDetails,
+                workflowResourceIds);
+    }
+
+    @Test
+    public void validateConfigurationResourceIdInAAITest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+
+        when(bbSetupUtils.getRelatedConfigurationByNameFromServiceInstance("siId123", "name123"))
+                .thenReturn(Optional.empty());
+        when(bbSetupUtils.existsAAIConfigurationGloballyByName("name123")).thenReturn(false);
+
+        String id = workflowAction.validateConfigurationResourceIdInAAI("generatedId123", "name123", reqDetails,
+                workflowResourceIds);
+        assertEquals("generatedId123", id);
+    }
+
+    @Test
+    public void validateConfigurationResourceIdInAAISameModelCustIdTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+
+        org.onap.aai.domain.yang.Configuration configuration = new org.onap.aai.domain.yang.Configuration();
+        configuration.setConfigurationId("id123");
+        configuration.setConfigurationName("name123");
+        configuration.setModelCustomizationId("1234567");
+        Optional<org.onap.aai.domain.yang.Configuration> opConfiguration = Optional.of(configuration);
+
+        when(bbSetupUtils.getRelatedConfigurationByNameFromServiceInstance("siId123", "name123"))
+                .thenReturn(opConfiguration);
+        when(bbSetupUtils.existsAAIConfigurationGloballyByName("name123")).thenReturn(false);
+
+        String id = workflowAction.validateConfigurationResourceIdInAAI("generatedId123", "name123", reqDetails,
+                workflowResourceIds);
+        assertEquals("id123", id);
+    }
+
+    @Test
+    public void validateConfigurationResourceIdInAAIDifferentModelCustIdTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+
+        org.onap.aai.domain.yang.Configuration configuration = new org.onap.aai.domain.yang.Configuration();
+        configuration.setConfigurationId("id123");
+        configuration.setConfigurationName("name123");
+        configuration.setModelCustomizationId("9999999");
+        Optional<org.onap.aai.domain.yang.Configuration> opConfiguration = Optional.of(configuration);
+
+        when(bbSetupUtils.getRelatedConfigurationByNameFromServiceInstance("siId123", "name123"))
+                .thenReturn(opConfiguration);
+        when(bbSetupUtils.existsAAIConfigurationGloballyByName("name123")).thenReturn(false);
+
+        this.expectedException.expect(DuplicateNameException.class);
+        this.expectedException.expectMessage(containsString(
+                "configuration with name (name123), same parent and different customization id (id123) already exists. The name must be unique."));
+
+        workflowAction.validateConfigurationResourceIdInAAI("generatedId123", "name123", reqDetails,
+                workflowResourceIds);
+    }
+
+    @Test
+    public void validateConfigurationResourceIdInAAINotGloballyUniqueTest() throws Exception {
+        RequestDetails reqDetails = setupRequestDetails("id123", "subServiceType123", "1234567");
+        WorkflowResourceIds workflowResourceIds = new WorkflowResourceIds();
+        workflowResourceIds.setServiceInstanceId("siId123");
+
+        when(bbSetupUtils.getRelatedConfigurationByNameFromServiceInstance("siId123", "name123"))
+                .thenReturn(Optional.empty());
+        when(bbSetupUtils.existsAAIConfigurationGloballyByName("name123")).thenReturn(true);
+
+        this.expectedException.expect(DuplicateNameException.class);
+        this.expectedException.expectMessage(
+                containsString("configuration with name name123 already exists. The name must be unique."));
+
+        workflowAction.validateConfigurationResourceIdInAAI("generatedId123", "name123", reqDetails,
+                workflowResourceIds);
+    }
+
     @Test
     public void handleRuntimeExceptionTest() {
         execution.setVariable("BPMN_javaExpMsg", "test runtime error message");