MockRequestControlContext context = new MockRequestControlContext();
context.putRequestParameter("_eventId", "submit");
context.putRequestParameter("integerProperty", "bogus 1");
context.putRequestParameter("dateProperty", "bogus 2");
BindBean bindBean = new BindBean();
StaticExpression modelObject = new StaticExpression(bindBean);
modelObject.setExpressionString("bindBean");
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());