### Question:
OperationInErrorStateHandler { private String getCurrentTaskId(FlowableEngineEvent flowableEngineEvent) { Execution currentExecutionForProcess = findCurrentExecution(flowableEngineEvent); return currentExecutionForProcess != null ? currentExecutionForProcess.getActivityId() : flowableFacade.getCurrentTaskId(flowableEngineEvent.getExecutionId()); } @Inject  OperationInErrorStateHandler(ProgressMessageService progressMessageService, FlowableFacade flowableFacade,
                                        HistoricOperationEventService historicOperationEventService, ClientReleaser clientReleaser); void handle(FlowableEngineEvent event, String errorMessage); void handle(FlowableEngineEvent event, Throwable throwable);  }### Answer:
@Test void testWithNoErrorMessageAndTaskIdFromContext() { Mockito.when(flowableFacadeMock.getCurrentTaskId("bar")) .thenReturn("barbar"); testWithNoErrorMessageWithExecutionEntity(false); }