@Test void testGetHookPhasesAfterStop() { List<HookPhase> hookPhases = List.of(HookPhase.AFTER_STOP); StopAppStep afterStepHookPhaseProvider = Mockito.mock(StopAppStep.class); Mockito.when(afterStepHookPhaseProvider.getHookPhasesAfterStep(context)) .thenReturn(hookPhases); List<HookPhase> hookPhasesBeforeStop = hooksPhaseGetter.getHookPhasesAfterStop(afterStepHookPhaseProvider, context); Assertions.assertEquals(1, hookPhasesBeforeStop.size()); Assertions.assertEquals(hookPhases, hookPhasesBeforeStop); }
public List<HookPhase> getHookPhasesAfterStop(SyncFlowableStep syncFlowableStep, ProcessContext context) { if (syncFlowableStep instanceof AfterStepHookPhaseProvider) { return ((AfterStepHookPhaseProvider) syncFlowableStep).getHookPhasesAfterStep(context); } return Collections.singletonList(HookPhase.NONE); }
HooksPhaseGetter { public List<HookPhase> getHookPhasesAfterStop(SyncFlowableStep syncFlowableStep, ProcessContext context) { if (syncFlowableStep instanceof AfterStepHookPhaseProvider) { return ((AfterStepHookPhaseProvider) syncFlowableStep).getHookPhasesAfterStep(context); } return Collections.singletonList(HookPhase.NONE); } }
HooksPhaseGetter { public List<HookPhase> getHookPhasesAfterStop(SyncFlowableStep syncFlowableStep, ProcessContext context) { if (syncFlowableStep instanceof AfterStepHookPhaseProvider) { return ((AfterStepHookPhaseProvider) syncFlowableStep).getHookPhasesAfterStep(context); } return Collections.singletonList(HookPhase.NONE); }  }
HooksPhaseGetter { public List<HookPhase> getHookPhasesAfterStop(SyncFlowableStep syncFlowableStep, ProcessContext context) { if (syncFlowableStep instanceof AfterStepHookPhaseProvider) { return ((AfterStepHookPhaseProvider) syncFlowableStep).getHookPhasesAfterStep(context); } return Collections.singletonList(HookPhase.NONE); }  List<HookPhase> getHookPhasesBeforeStop(SyncFlowableStep syncFlowableStep, ProcessContext context); List<HookPhase> getHookPhasesAfterStop(SyncFlowableStep syncFlowableStep, ProcessContext context); }
HooksPhaseGetter { public List<HookPhase> getHookPhasesAfterStop(SyncFlowableStep syncFlowableStep, ProcessContext context) { if (syncFlowableStep instanceof AfterStepHookPhaseProvider) { return ((AfterStepHookPhaseProvider) syncFlowableStep).getHookPhasesAfterStep(context); } return Collections.singletonList(HookPhase.NONE); }  List<HookPhase> getHookPhasesBeforeStop(SyncFlowableStep syncFlowableStep, ProcessContext context); List<HookPhase> getHookPhasesAfterStop(SyncFlowableStep syncFlowableStep, ProcessContext context);  }