### Question:
BBInputSetup implements JavaDelegate { protected void setHomingFlag(GeneralBuildingBlock outputBB, boolean homing, Map<ResourceKey, String> lookupKeyMap) { if (lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID) != null && homing && outputBB != null) { for (GenericVnf vnf : outputBB.getCustomer().getServiceSubscription().getServiceInstances().get(0) .getVnfs()) { if (vnf.getVnfId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID))) { vnf.setCallHoming(homing); } } } }  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 testSetHomingFlag() throws IOException { GeneralBuildingBlock expected = mapper.readValue(new File(RESOURCE_PATH + "GeneralBuildingBlockExpected.json"), GeneralBuildingBlock.class); Map<ResourceKey, String> lookupKeyMap = new HashMap<>(); lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, "vnfId"); GenericVnf genericVnfExpected = new GenericVnf(); genericVnfExpected.setVnfId("vnfId"); genericVnfExpected.setCallHoming(true); expected.getCustomer().getServiceSubscription().getServiceInstances().get(0).getVnfs().add(genericVnfExpected); boolean homing = true; GenericVnf genericVnfActual = new GenericVnf(); genericVnfActual.setVnfId("vnfId"); genericVnfActual.setCallHoming(false); GeneralBuildingBlock actual = mapper.readValue(new File(RESOURCE_PATH + "GeneralBuildingBlockExpected.json"), GeneralBuildingBlock.class); actual.getCustomer().getServiceSubscription().getServiceInstances().get(0).getVnfs().add(genericVnfActual); SPY_bbInputSetup.setHomingFlag(actual, homing, lookupKeyMap); assertThat(actual, sameBeanAs(expected)); }