### Question:
BBInputSetup implements JavaDelegate { protected VolumeGroup createVolumeGroup(Map<ResourceKey, String> lookupKeyMap, String volumeGroupId, String instanceName, String vnfType, List<Map<String, String>> instanceParams) { lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, volumeGroupId); VolumeGroup volumeGroup = new VolumeGroup(); volumeGroup.setVolumeGroupId(volumeGroupId); volumeGroup.setVolumeGroupName(instanceName); volumeGroup.setVnfType(vnfType); volumeGroup.setOrchestrationStatus(OrchestrationStatus.PRECREATED); if (instanceParams != null) { for (Map<String, String> params : instanceParams) { volumeGroup.getCloudParams().putAll(params); } } return volumeGroup; }  BBInputSetupUtils getBbInputSetupUtils(); void setCloudInfoFromAAI(CloudInfoFromAAI cloudInfoFromAAI); void setBbInputSetupUtils(BBInputSetupUtils bbInputSetupUtils); BBInputSetupMapperLayer getMapperLayer(); void setMapperLayer(BBInputSetupMapperLayer mapperLayer); @Override void execute(DelegateExecution execution); ServiceInstance getExistingServiceInstance(org.onap.aai.domain.yang.ServiceInstance serviceInstanceAAI);  }### Answer:
@Test public void testCreateVolumeGroup() { String volumeGroupId = "volumeGroupId"; String instanceName = "vfModuleName"; String vnfType = "vnfType"; Map<String, String> cloudParams = new HashMap<>(); cloudParams.put("param1", "param1Value"); VolumeGroup expected = new VolumeGroup(); expected.setVolumeGroupId(volumeGroupId); expected.setVolumeGroupName(instanceName); expected.setCloudParams(cloudParams); expected.setVnfType(vnfType); expected.setOrchestrationStatus(OrchestrationStatus.PRECREATED); Map<ResourceKey, String> lookupKeyMap = new HashMap<>(); List<Map<String, String>> instanceParams = new ArrayList<>(); instanceParams.add(cloudParams); VolumeGroup actual = SPY_bbInputSetup.createVolumeGroup(lookupKeyMap, volumeGroupId, instanceName, vnfType, instanceParams); assertThat(actual, sameBeanAs(expected)); assertEquals("LookupKeyMap is populated", volumeGroupId, lookupKeyMap.get(ResourceKey.VOLUME_GROUP_ID)); expected.getCloudParams().clear(); actual = SPY_bbInputSetup.createVolumeGroup(lookupKeyMap, volumeGroupId, instanceName, vnfType, null); assertThat(actual, sameBeanAs(expected)); }