assert !Contexts.isEventContextActive();
assert !Contexts.isSessionContextActive();
assert !Contexts.isApplicationContextActive();
assert !Contexts.isConversationContextActive();
phases.beforePhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
assert Contexts.isEventContextActive();
assert Contexts.isSessionContextActive();
assert Contexts.isApplicationContextActive();
assert !Contexts.isConversationContextActive();
phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, MockLifecycle.INSTANCE ) );
assert Contexts.isConversationContextActive();
assert !Manager.instance().isLongRunningConversation();
phases.beforePhase( new PhaseEvent(facesContext, PhaseId.APPLY_REQUEST_VALUES, MockLifecycle.INSTANCE ) );
phases.afterPhase( new PhaseEvent(facesContext, PhaseId.APPLY_REQUEST_VALUES, MockLifecycle.INSTANCE ) );
phases.beforePhase( new PhaseEvent(facesContext, PhaseId.PROCESS_VALIDATIONS, MockLifecycle.INSTANCE ) );
phases.afterPhase( new PhaseEvent(facesContext, PhaseId.PROCESS_VALIDATIONS, MockLifecycle.INSTANCE ) );
phases.beforePhase( new PhaseEvent(facesContext, PhaseId.UPDATE_MODEL_VALUES, MockLifecycle.INSTANCE ) );
phases.afterPhase( new PhaseEvent(facesContext, PhaseId.UPDATE_MODEL_VALUES, MockLifecycle.INSTANCE ) );
phases.beforePhase( new PhaseEvent(facesContext, PhaseId.INVOKE_APPLICATION, MockLifecycle.INSTANCE ) );
Manager.instance().beginConversation();
phases.afterPhase( new PhaseEvent(facesContext, PhaseId.INVOKE_APPLICATION, MockLifecycle.INSTANCE ) );
assert Manager.instance().isLongRunningConversation();
phases.beforePhase( new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE ) );
assert Contexts.isEventContextActive();
assert Contexts.isSessionContextActive();
assert Contexts.isApplicationContextActive();
assert Contexts.isConversationContextActive();
facesContext.getApplication().getStateManager().saveView(facesContext);
assert facesContext.getViewRoot().getAttributes().size()==1;
phases.afterPhase( new PhaseEvent(facesContext, PhaseId.RENDER_RESPONSE, MockLifecycle.INSTANCE ) );
assert !Contexts.isEventContextActive();
assert !Contexts.isSessionContextActive();
assert !Contexts.isApplicationContextActive();
assert !Contexts.isConversationContextActive();