context.getCurrentState().getAttributes().put("model", modelObject);
context.getFlowScope().put("bindBean", bindBean);
context.getMockExternalContext().setNativeContext(new MockServletContext());
context.getMockExternalContext().setNativeRequest(new MockHttpServletRequest());
context.getMockExternalContext().setNativeResponse(new MockHttpServletResponse());
context.getMockFlowExecutionContext().setKey(new MockFlowExecutionKey("c1v1"));
org.springframework.web.servlet.View mvcView = new MockView();
AbstractMvcView view = new MockMvcView(mvcView, context);
view.setExpressionParser(createExpressionParser());
view.setMessageCodesResolver(new WebFlowMessageCodesResolver());
context.setAlwaysRedirectOnPause(true);
assertTrue(view.userEventQueued());
view.processUserEvent();
assertFalse(view.userEventQueued());
assertFalse(view.hasFlowEvent());
Object viewActionState = view.getUserEventState();
assertNotNull(viewActionState);
viewActionState = saveAndRestoreViewActionState(viewActionState);
MockRequestControlContext context2 = new MockRequestControlContext();
context2.getFlashScope().put(org.springframework.webflow.execution.View.USER_EVENT_STATE_ATTRIBUTE,
viewActionState);
BindBean bindBean2 = new BindBean();
StaticExpression modelObject2 = new StaticExpression(bindBean2);
modelObject2.setExpressionString("bindBean");
context2.getCurrentState().getAttributes().put("model", modelObject);
context2.getFlowScope().put("bindBean", bindBean);
context2.getMockExternalContext().setNativeContext(new MockServletContext());
context2.getMockExternalContext().setNativeRequest(new MockHttpServletRequest());
context2.getMockExternalContext().setNativeResponse(new MockHttpServletResponse());
context2.getMockFlowExecutionContext().setKey(new MockFlowExecutionKey("c1v1"));
AbstractMvcView view2 = new MockMvcView(mvcView, context2);
view2.setExpressionParser(createExpressionParser());
view2.setMessageCodesResolver(new WebFlowMessageCodesResolver());
view2.restoreState((ViewActionStateHolder) viewActionState);
assertFalse(view2.userEventQueued());