{
addSupportedPhase(mockProcessPhase1);
addNotSupportedPhase(mockProcessPhase2);
addSupportedPhase(mockProcessPhase3);
when(mockProcessPhase2.supportsTemplate(mockTemplate)).thenReturn(false);
PhaseExecutionEngine phaseExecutionEngine = new PhaseExecutionEngine(phaseList, mockExceptionHandler, mockEndPhase);
phaseExecutionEngine.process(mockTemplate, mockContext);
verify(mockProcessPhase1,times(1)).runPhase(any(EndPhaseTemplate.class),any(MessageProcessContext.class), any(PhaseResultNotifier.class));
verify(mockProcessPhase2,times(0)).runPhase(any(EndPhaseTemplate.class),any(MessageProcessContext.class), any(PhaseResultNotifier.class));
verify(mockProcessPhase3,times(1)).runPhase(any(EndPhaseTemplate.class), any(MessageProcessContext.class), any(PhaseResultNotifier.class));
}