### Question:
DeleteApplicationRoutesStep extends UndeployAppStep implements BeforeStepHookPhaseProvider { @Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Arrays.asList(HookPhase.BEFORE_UNMAP_ROUTES, HookPhase.APPLICATION_BEFORE_UNMAP_ROUTES), context); }  @Override List<HookPhase> getHookPhasesBeforeStep(ProcessContext context);  }### Answer:
@Test void testGetHookPhaseBefore() { Mockito.when(hooksPhaseBuilder.buildHookPhases(List.of(HookPhase.BEFORE_UNMAP_ROUTES, HookPhase.APPLICATION_BEFORE_UNMAP_ROUTES), context)) .thenReturn(List.of(HookPhase.BLUE_GREEN_APPLICATION_BEFORE_UNMAP_ROUTES_LIVE, HookPhase.APPLICATION_BEFORE_UNMAP_ROUTES)); List<HookPhase> expectedPhases = List.of(HookPhase.BLUE_GREEN_APPLICATION_BEFORE_UNMAP_ROUTES_LIVE, HookPhase.APPLICATION_BEFORE_UNMAP_ROUTES); List<HookPhase> hookPhasesBeforeStep = ((BeforeStepHookPhaseProvider) step).getHookPhasesBeforeStep(context); assertEquals(expectedPhases, hookPhasesBeforeStep); }