### Question:
AAIDeleteTasks { public void deleteVnf(BuildingBlockExecution execution) throws Exception { GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); execution.setVariable("aaiVnfRollback", false); try { aaiVnfResources.deleteVnf(genericVnf); execution.setVariable("aaiVnfRollback", true); } catch (Exception ex) { logger.error("Exception occurred in AAIDeleteTasks deleteVnf 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 deleteVnfTest() throws Exception { doNothing().when(aaiVnfResources).deleteVnf(genericVnf); aaiDeleteTasks.deleteVnf(execution); verify(aaiVnfResources, times(1)).deleteVnf(genericVnf); }
@Test public void deleteVnfTestException() throws Exception { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(aaiVnfResources).deleteVnf(genericVnf); aaiDeleteTasks.deleteVnf(execution); verify(aaiVnfResources, times(1)).deleteVnf(genericVnf); }