### Question:
ToscaResourceInstaller { protected void correlateConfigCustomResources(Service service) { ConfigurationResourceCustomization vrfConfigCustomResource = null; ConfigurationResourceCustomization vnrConfigCustomResource = null; List<ConfigurationResourceCustomization> configCustomList = service.getConfigurationCustomizations(); for (ConfigurationResourceCustomization configResource : configCustomList) { String nodeType = configResource.getConfigurationResource().getToscaNodeType(); if (NODES_VRF_ENTRY.equalsIgnoreCase(nodeType)) { vrfConfigCustomResource = configResource; } else if (VLAN_NETWORK_RECEPTOR.equalsIgnoreCase(nodeType)) { vnrConfigCustomResource = configResource; } } if (vrfConfigCustomResource != null) { vrfConfigCustomResource.setConfigResourceCustomization(vnrConfigCustomResource); configCustomizationRepo.save(vrfConfigCustomResource); } if (vnrConfigCustomResource != null) { vnrConfigCustomResource.setConfigResourceCustomization(vrfConfigCustomResource); configCustomizationRepo.save(vnrConfigCustomResource); } }  boolean isCsarAlreadyDeployed(ToscaResourceStructure toscaResourceStructure); boolean isResourceAlreadyDeployed(ResourceStructure vfResourceStruct, boolean serviceDeployed); void installTheComponentStatus(IStatusData iStatus); @Transactional(rollbackFor = {ArtifactInstallerException.class}) void installTheResource(ToscaResourceStructure toscaResourceStruct, ResourceStructure resourceStruct); @Transactional(rollbackFor = {ArtifactInstallerException.class}) void installTheVfResource(ToscaResourceStructure toscaResourceStruct, VfResourceStructure vfResourceStruct); void processWatchdog(String distributionId, String servideUUID, Optional<String> distributionNotification,
            String consumerId); String verifyTheFilePrefixInArtifacts(String filebody, VfResourceStructure vfResourceStructure,
            List<String> listTypes); String verifyTheFilePrefixInString(final String body, final String filenameToVerify); String getVnfcResourceInput(IEntityDetails vfcEntity, List<Input> inputList); List<IEntityDetails> getEntityDetails(ToscaResourceStructure toscaResourceStruct,
            EntityQueryBuilder entityType, TopologyTemplateQueryBuilder topologyTemplateBuilder, boolean nestedSearch); String getLeafPropertyValue(IEntityDetails entityDetails, String propName); @Transactional(rollbackFor = {ArtifactInstallerException.class}) void installNsstService(ToscaResourceStructure toscaResourceStruct, VfResourceStructure vfResourceStruct,
            String artifactContent);  }### Answer:
@Test public void correlateConfigCustomResourcesTest() { ConfigurationResource vrfConfigResource = mock(ConfigurationResource.class); ConfigurationResourceCustomization vrfConfigCustom = mock(ConfigurationResourceCustomization.class); doReturn(ToscaResourceInstaller.NODES_VRF_ENTRY).when(vrfConfigResource).getToscaNodeType(); doReturn(vrfConfigResource).when(vrfConfigCustom).getConfigurationResource(); ConfigurationResource vnrConfigResource = mock(ConfigurationResource.class); ConfigurationResourceCustomization vnrConfigCustom = mock(ConfigurationResourceCustomization.class); doReturn(ToscaResourceInstaller.VLAN_NETWORK_RECEPTOR).when(vnrConfigResource).getToscaNodeType(); doReturn(vnrConfigResource).when(vnrConfigCustom).getConfigurationResource(); ConfigurationResourceCustomizationRepository configCustomizationRepo = spy(ConfigurationResourceCustomizationRepository.class); ReflectionTestUtils.setField(toscaInstaller, "configCustomizationRepo", configCustomizationRepo); doReturn(vrfConfigCustom).when(configCustomizationRepo).save(vrfConfigCustom); doReturn(vnrConfigCustom).when(configCustomizationRepo).save(vnrConfigCustom); List<ConfigurationResourceCustomization> configList = new ArrayList<>(); configList.add(vrfConfigCustom); configList.add(vnrConfigCustom); doReturn(configList).when(service).getConfigurationCustomizations(); toscaInstaller.correlateConfigCustomResources(service); verify(vrfConfigCustom, times(1)).getConfigurationResource(); verify(vrfConfigCustom, times(1)).setConfigResourceCustomization(vnrConfigCustom); verify(service, times(1)).getConfigurationCustomizations(); verify(vnrConfigCustom, times(1)).getConfigurationResource(); verify(vnrConfigCustom, times(1)).setConfigResourceCustomization(vrfConfigCustom); }