### Question:
BBInputSetup implements JavaDelegate { protected VfModule createVfModule(Map<ResourceKey, String> lookupKeyMap, String vfModuleId, String instanceName, List<Map<String, String>> instanceParams) { lookupKeyMap.put(ResourceKey.VF_MODULE_ID, vfModuleId); VfModule vfModule = new VfModule(); vfModule.setVfModuleId(vfModuleId); vfModule.setVfModuleName(instanceName); vfModule.setOrchestrationStatus(OrchestrationStatus.PRECREATED); if (instanceParams != null) { for (Map<String, String> params : instanceParams) { vfModule.getCloudParams().putAll(params); } } return vfModule; }  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 testCreateVfModule() { String vfModuleId = "vfModuleId"; String instanceName = "vfModuleName"; Map<String, String> cloudParams = new HashMap<>(); cloudParams.put("param1", "param1Value"); VfModule expected = new VfModule(); expected.setVfModuleId(vfModuleId); expected.setVfModuleName(instanceName); expected.setCloudParams(cloudParams); expected.setOrchestrationStatus(OrchestrationStatus.PRECREATED); Map<ResourceKey, String> lookupKeyMap = new HashMap<>(); List<Map<String, String>> instanceParams = new ArrayList<>(); instanceParams.add(cloudParams); VfModule actual = SPY_bbInputSetup.createVfModule(lookupKeyMap, vfModuleId, instanceName, instanceParams); assertThat(actual, sameBeanAs(expected)); assertEquals("LookupKeyMap is populated", vfModuleId, lookupKeyMap.get(ResourceKey.VF_MODULE_ID)); expected.getCloudParams().clear(); actual = SPY_bbInputSetup.createVfModule(lookupKeyMap, vfModuleId, instanceName, null); assertThat(actual, sameBeanAs(expected)); }