### Question:
ProcessStepHelper { public void failStepIfProcessIsAborted(ProcessContext context) { String correlationId = context.getVariable(Variables.CORRELATION_ID); List<HistoricOperationEvent> historicOperationEvents = getProcessHelper().getHistoricOperationEventByProcessId(correlationId); if (isProcessAborted(historicOperationEvents)) { throw new SLException(Messages.PROCESS_WAS_ABORTED); } }  void failStepIfProcessIsAborted(ProcessContext context); static boolean isProcessAborted(List<HistoricOperationEvent> historicOperationEvents); abstract ProgressMessageService getProgressMessageService(); abstract ProcessLogsPersister getProcessLogsPersister(); abstract StepLogger getStepLogger(); abstract ProcessEngineConfiguration getProcessEngineConfiguration(); abstract ProcessHelper getProcessHelper();  }### Answer:
@Test void testFailStepPhaseAbortIsInvoked() { prepareHistoricOperationsEventGetter(HistoricOperationEvent.EventType.STARTED, HistoricOperationEvent.EventType.FINISHED, HistoricOperationEvent.EventType.ABORT_EXECUTED); Exception exception = Assertions.assertThrows(SLException.class, () -> processStepHelper.failStepIfProcessIsAborted(context)); Assertions.assertEquals(Messages.PROCESS_WAS_ABORTED, exception.getMessage()); }
@Test void testFailedStepPhaseAbortIsNotInvoked() { prepareHistoricOperationsEventGetter(HistoricOperationEvent.EventType.STARTED, HistoricOperationEvent.EventType.FINISHED); Assertions.assertDoesNotThrow(() -> processStepHelper.failStepIfProcessIsAborted(context)); }