### Question:
NetworkAdapterCreateTasks { public void createNetwork(BuildingBlockExecution execution) { execution.setVariable("networkAdapterCreateRollback", false); try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); L3Network l3Network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID); Map<String, String> userInput = gBBInput.getUserInput(); String cloudRegionPo = execution.getVariable("cloudRegionPo"); CreateNetworkRequest createNetworkRequest = networkAdapterObjectMapper.createNetworkRequestMapper( gBBInput.getRequestContext(), gBBInput.getCloudRegion(), gBBInput.getOrchContext(), serviceInstance, l3Network, userInput, cloudRegionPo, gBBInput.getCustomer()); execution.setVariable("networkAdapterRequest", createNetworkRequest.toXmlString()); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } }  void createNetwork(BuildingBlockExecution execution); void processResponseFromOpenstack(BuildingBlockExecution execution); void rollbackCreateNetwork(BuildingBlockExecution execution);  }### Answer:
@Test public void createNetworkTest() throws Exception { String cloudRegionPo = "cloudRegionPo"; CreateNetworkRequest createNetworkRequest = new CreateNetworkRequest(); execution.setVariable("cloudRegionPo", cloudRegionPo); doReturn(createNetworkRequest).when(networkAdapterObjectMapper).createNetworkRequestMapper( isA(RequestContext.class), isA(CloudRegion.class), isA(OrchestrationContext.class), isA(ServiceInstance.class), isA(L3Network.class), isA(Map.class), isA(String.class), isA(Customer.class)); networkAdapterCreateTasks.createNetwork(execution); verify(networkAdapterObjectMapper, times(1)).createNetworkRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance, l3Network, userInput, cloudRegionPo, customer); assertEquals(createNetworkRequest.toXmlString(), execution.getVariable("networkAdapterRequest")); }