_testimpl.setAfterPhaseListener(afterListener);
Method[] mockedMethods = new Method[] {
PhaseListener.class.getMethod("beforePhase", new Class[] { PhaseEvent.class }),
PhaseListener.class.getMethod("afterPhase", new Class[] { PhaseEvent.class }) };
PhaseListener phaseListener = _mocksControl.createMock(phaseListenerClasses.get(phaseId), mockedMethods);
_testimpl.addPhaseListener(phaseListener);
PhaseListener anyPhaseListener = _mocksControl.createMock(AnyPhasePhaseListener.class, mockedMethods);
_testimpl.addPhaseListener(anyPhaseListener);
PhaseListener restoreViewPhaseListener = _mocksControl.createMock(RestoreViewPhasePhaseListener.class,
mockedMethods);
_testimpl.addPhaseListener(restoreViewPhaseListener);
_mocksControl.checkOrder(true);