### Question:
CreateVFModule { public void createInventoryVariable(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID); GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); CloudInformation cloudInformation = new CloudInformation(); cloudInformation.setOwner(gBBInput.getCloudRegion().getCloudOwner()); cloudInformation.setRegionId(gBBInput.getCloudRegion().getLcpCloudRegionId()); cloudInformation.setTenantId(gBBInput.getTenant().getTenantId()); cloudInformation.setTenantName(gBBInput.getTenant().getTenantName()); cloudInformation.setTenantContext(gBBInput.getTenant().getTenantContext()); cloudInformation.setTemplateInstanceId(execution.getVariable("heatStackId")); cloudInformation.setNodeType(getNodeType(gBBInput.getCloudRegion())); cloudInformation.setVnfName(vnf.getVnfName()); cloudInformation.setVnfId(vnf.getVnfId()); cloudInformation.setVfModuleId(vfModule.getVfModuleId()); execution.setVariable("cloudInformation", cloudInformation); } catch (Exception e) { logger.error("Error building CloudInformation Object for NC Inventory", e); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, e); } }  void createInventoryVariable(BuildingBlockExecution execution);  }### Answer:
@Test public void createInventoryVariableTest() throws BBObjectNotFoundException { doReturn(gbb).when(execution).getGeneralBuildingBlock(); doReturn(genericVnf).when(extractPojosForBB).extractByKey(execution, ResourceKey.GENERIC_VNF_ID); doReturn(vfModule).when(extractPojosForBB).extractByKey(execution, ResourceKey.VF_MODULE_ID); doReturn("heat-stack-id").when(execution).getVariable("heatStackId"); doReturn(NodeType.GREENFIELD).when(createVFModule).getNodeType(any(CloudRegion.class)); createVFModule.createInventoryVariable(execution); verify(execution).setVariable(eq("cloudInformation"), any(CloudInformation.class)); }