### Question:
BBInputSetup implements JavaDelegate { protected String getVnfId(ExecuteBuildingBlock executeBB, Map<ResourceKey, String> lookupKeyMap) { String vnfId = lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID); if (vnfId == null) { InfraActiveRequests request = this.bbInputSetupUtils.getInfraActiveRequest(executeBB.getRequestId()); vnfId = request.getVnfId(); } return vnfId; }  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 testGetVnfId() { String expected = "vnfId"; ExecuteBuildingBlock executeBB = new ExecuteBuildingBlock().setRequestId("requestId"); Map<ResourceKey, String> lookupKeyMap = new HashMap<>(); InfraActiveRequests request = new InfraActiveRequests(); request.setVnfId(expected); doReturn(request).when(SPY_bbInputSetupUtils).getInfraActiveRequest(executeBB.getRequestId()); String actual = SPY_bbInputSetup.getVnfId(executeBB, lookupKeyMap); assertEquals("VnfId is set correctly", expected, actual); }