### Question:
VnfAdapterDeleteTasks { public void deleteVolumeGroup(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); VolumeGroup volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID); DeleteVolumeGroupRequest deleteVolumeGroupRequest = vnfAdapterVolumeGroupResources.deleteVolumeGroupRequest( gBBInput.getRequestContext(), gBBInput.getCloudRegion(), serviceInstance, volumeGroup); execution.setVariable(VNFREST_REQUEST, deleteVolumeGroupRequest.toXmlString()); execution.setVariable("deleteVolumeGroupRequest", "true"); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } }  void deleteVolumeGroup(BuildingBlockExecution execution); void deleteVfModule(BuildingBlockExecution execution);  }### Answer:
@Test public void test_deleteVolumeGroup() throws Exception { DeleteVolumeGroupRequest deleteVolumeGroupRequest = new DeleteVolumeGroupRequest(); deleteVolumeGroupRequest.setVolumeGroupId("volumeGroupId"); doReturn(deleteVolumeGroupRequest).when(vnfAdapterVolumeGroupResources).deleteVolumeGroupRequest(requestContext, cloudRegion, serviceInstance, volumeGroup); vnfAdapterDeleteTasks.deleteVolumeGroup(execution); verify(vnfAdapterVolumeGroupResources, times(1)).deleteVolumeGroupRequest(ArgumentMatchers.eq(requestContext), ArgumentMatchers.eq(cloudRegion), ArgumentMatchers.eq(serviceInstance), ArgumentMatchers.eq(volumeGroup)); assertEquals(execution.getVariable("VNFREST_Request"), deleteVolumeGroupRequest.toXmlString()); }
@Test public void deleteVolumeGroupExceptionTest() throws Exception { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(vnfAdapterVolumeGroupResources).deleteVolumeGroupRequest(requestContext, cloudRegion, serviceInstance, volumeGroup); vnfAdapterDeleteTasks.deleteVolumeGroup(execution); }