BasicFormController action = new BasicFormController();
ActionForward actionForward = new ActionForward();
HttpServletRequest request = createStrictMock(HttpServletRequest.class);
BasicFormAction actionBean = createStrictMock(BasicFormAction.class);
ActionMapping mapping = createStrictMock(ActionMapping.class);
DelegatingForm form = createStrictMock(DelegatingForm.class);
ActionErrors errors = new ActionErrors();
errors.add("prop", new ActionMessage("key"));
expect(request.getAttribute(Globals.ERROR_KEY)).andReturn(errors);
actionBean.setInputError(true);
expect(actionBean.execute()).andReturn("success");
expect(form.getBindOutwards()).andReturn(false);
expect(mapping.findForward("success")).andReturn(actionForward);
replay(actionBean);
replay(mapping);