### Question:
AAIUpdateTasks { public void updateObjectVnf(BuildingBlockExecution execution) { try { GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID); aaiVnfResources.updateObjectVnf(genericVnf); } catch (Exception ex) { logger.error("Exception occurred in AAIUpdateTasks updateObjectVnf", ex); exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } }  void updateOrchestrationStatusAssignedService(BuildingBlockExecution execution); void updateOrchestrationStatusActiveService(BuildingBlockExecution execution); void updateOrchestrationStatusAssignedPnf(BuildingBlockExecution execution); void updateOrchestrationStatusInventoriedPnf(BuildingBlockExecution execution); void updateOrchestrationStatusActivePnf(BuildingBlockExecution execution); void updateOrchestrationStatusRegisterPnf(BuildingBlockExecution execution); void updateOrchestrationStatusRegisteredPnf(BuildingBlockExecution execution); void updateOrchestrationStatusAssignedVnf(BuildingBlockExecution execution); void updateOrchestrationStatusActiveVnf(BuildingBlockExecution execution); void updateOrchestrationStatusAssignedVolumeGroup(BuildingBlockExecution execution); void updateOrchestrationStatusActiveVolumeGroup(BuildingBlockExecution execution); void updateOrchestrationStatusCreatedVolumeGroup(BuildingBlockExecution execution); void updateHeatStackIdVolumeGroup(BuildingBlockExecution execution); void updateOrchestrationStatusAssignedVfModule(BuildingBlockExecution execution); void updateOrchestrationStatusPendingActivationVfModule(BuildingBlockExecution execution); void updateOrchestrationStatusCreatedVfModule(BuildingBlockExecution execution); void updateOrchestrationStatusActivateVfModule(BuildingBlockExecution execution); void updateOrchestrationStatusDeactivateVfModule(BuildingBlockExecution execution); void updateOrchestrationStatusAssignedNetwork(BuildingBlockExecution execution); void updateOrchestrationStatusActiveNetwork(BuildingBlockExecution execution); void updateOrchestrationStatusCreatedNetwork(BuildingBlockExecution execution); void updateOrchestrationStatusActiveNetworkCollection(BuildingBlockExecution execution); void updateHeatStackIdVfModule(BuildingBlockExecution execution); void updateNetworkCreated(BuildingBlockExecution execution); void updateNetworkUpdated(BuildingBlockExecution execution); void updateObjectNetwork(BuildingBlockExecution execution); void updateServiceInstance(BuildingBlockExecution execution); void updateObjectVnf(BuildingBlockExecution execution); void updateOrchestrationStatusDeleteVfModule(BuildingBlockExecution execution); void updateModelVfModule(BuildingBlockExecution execution); void updateOrchestrationStatusAssignFabricConfiguration(BuildingBlockExecution execution); void updateOrchestrationStatusActivateFabricConfiguration(BuildingBlockExecution execution); void updateOrchestrationStatusDeactivateFabricConfiguration(BuildingBlockExecution execution); void updateIpv4OamAddressVnf(BuildingBlockExecution execution); void updateManagementV6AddressVnf(BuildingBlockExecution execution); void updateContrailServiceInstanceFqdnVfModule(BuildingBlockExecution execution); void updateOrchestrationStatusConfigAssignedVnf(BuildingBlockExecution execution); void updateOrchestrationStatusConfigDeployConfigureVnf(BuildingBlockExecution execution); void updateOrchestrationStatusConfigDeployConfiguredVnf(BuildingBlockExecution execution); void updateOrchestrationStatus(BuildingBlockExecution execution, String scope, String action);  }### Answer:
@Test public void updateObjectVnfTest() { doNothing().when(aaiVnfResources).updateObjectVnf(genericVnf); aaiUpdateTasks.updateObjectVnf(execution); verify(aaiVnfResources, times(1)).updateObjectVnf(genericVnf); }
@Test public void updateObjectVnfExceptionTest() { expectedException.expect(BpmnError.class); doThrow(RuntimeException.class).when(aaiVnfResources).updateObjectVnf(genericVnf); aaiUpdateTasks.updateObjectVnf(execution); }