### Question:
NetworkAdapterCreateTasks { public void rollbackCreateNetwork(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); L3Network l3Network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID); CreateNetworkResponse createNetworkResponse = execution.getVariable("createNetworkResponse"); Map<String, String> userInput = gBBInput.getUserInput(); String cloudRegionPo = execution.getVariable("cloudRegionPo"); networkAdapterResources.rollbackCreateNetwork(gBBInput.getRequestContext(), gBBInput.getCloudRegion(), gBBInput.getOrchContext(), serviceInstance, l3Network, userInput, cloudRegionPo, createNetworkResponse); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } }  void createNetwork(BuildingBlockExecution execution); void processResponseFromOpenstack(BuildingBlockExecution execution); void rollbackCreateNetwork(BuildingBlockExecution execution);  }### Answer:
@Test public void rollbackCreateNetworkTest() throws Exception { CreateNetworkResponse createNetworkResponse = new CreateNetworkResponse(); createNetworkResponse.setNetworkStackId("networkStackId"); createNetworkResponse.setNetworkCreated(true); execution.setVariable("createNetworkResponse", createNetworkResponse); Optional<CreateNetworkResponse> oCreateNetworkResponse = Optional.of(createNetworkResponse); String cloudRegionPo = "cloudRegionPo"; execution.setVariable("cloudRegionPo", cloudRegionPo); doReturn(oCreateNetworkResponse).when(networkAdapterResources).rollbackCreateNetwork(requestContext, cloudRegion, orchestrationContext, serviceInstance, l3Network, userInput, cloudRegionPo, createNetworkResponse); networkAdapterCreateTasks.rollbackCreateNetwork(execution); verify(networkAdapterResources, times(1)).rollbackCreateNetwork(requestContext, cloudRegion, orchestrationContext, serviceInstance, l3Network, userInput, cloudRegionPo, createNetworkResponse); }