public void testResumeViewStateForEventStateNotExitedAjax() {
Flow flow = new Flow("myFlow");
StubViewFactory viewFactory = new StubViewFactory();
ViewState state = new ViewState(flow, "viewState", viewFactory);
Transition t = new Transition(on("submit"), null);
TestAction action = new TestAction();
t.setExecutionCriteria(new ActionTransitionCriteria(action));
state.getTransitionSet().add(t);
MockRequestControlContext context = new MockRequestControlContext(flow);
context.getMockExternalContext().setAjaxRequest(true);
state.enter(context);
context = new MockRequestControlContext(context.getFlowExecutionContext());
context.putRequestParameter("_eventId", "submit");
context.getMockExternalContext().setAjaxRequest(true);
state.resume(context);
assertTrue(context.getFlowExecutionContext().isActive());
assertEquals(1, action.getExecutionCount());
assertTrue("Render not called", context.getFlowScope().contains("renderCalled"));
assertFalse(context.getMockExternalContext().getFlowExecutionRedirectRequested());
}