### Question:
AAIDeleteTasks { public void deleteVfModule(BuildingBlockExecution execution) throws Exception { GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID); execution.setVariable("aaiVfModuleRollback", false); try { aaiVfModuleResources.deleteVfModule(vfModule, genericVnf); execution.setVariable("aaiVfModuleRollback", true); } catch (Exception ex) { logger.error("Exception occurred in AAIDeleteTasks deleteVfModule process", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } }  void deleteVfModule(BuildingBlockExecution execution); void deleteVnf(BuildingBlockExecution execution); void deleteServiceInstance(BuildingBlockExecution execution); void deleteNetwork(BuildingBlockExecution execution); void deleteCollection(BuildingBlockExecution execution); void deleteInstanceGroup(BuildingBlockExecution execution); void deleteVolumeGroup(BuildingBlockExecution execution); void deleteConfiguration(BuildingBlockExecution execution); void deleteInstanceGroupVnf(BuildingBlockExecution execution); void deleteNetworkPolicies(BuildingBlockExecution execution);  }### Answer:
@Test public void deleteVfModuleTest() throws Exception { doNothing().when(aaiVfModuleResources).deleteVfModule(vfModule, genericVnf); aaiDeleteTasks.deleteVfModule(execution); verify(aaiVfModuleResources, times(1)).deleteVfModule(vfModule, genericVnf); }
@Test public void deleteVfModuleExceptionTest() throws Exception { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(aaiVfModuleResources).deleteVfModule(vfModule, genericVnf); aaiDeleteTasks.deleteVfModule(execution); }