{
@Test
public void testCreateAction() throws Exception
{
ServletActionContext sac = getActionContext();
ControllerProcessorDelegate delegate = newMock(ControllerProcessorDelegate.class);
ActionContextFactory factory = newMock(ActionContextFactory.class);
ExecuteAction executeAction = getExecuteAction(delegate, factory);
Action action = newMock(Action.class);
ActionMapping actionConfig = newMock(ActionMapping.class);
ActionForm actionForm = newMock(ActionForm.class);
ActionContext actionContext = newMock(ActionContext.class);
ActionForward forwardConfig = newMock(ActionForward.class);
HttpServletRequest request = newMock(HttpServletRequest.class);
HttpServletResponse response = newMock(HttpServletResponse.class);
ServletContext servletContext = newMock(ServletContext.class);
expect(sac.getRequest()).andReturn(request);
expect(sac.getResponse()).andReturn(response);
expect(sac.getContext()).andReturn(servletContext);
expect(factory.createActionContext(request, response, servletContext, actionForm, actionConfig)).andReturn(actionContext);
expect(action.execute(actionConfig, actionForm, request, response)).andReturn(forwardConfig);
replayMocks();
executeAction.execute(sac, action, actionConfig, actionForm);