public void testCreateAction() throws Exception
{
ActionCreator actionCreator = newMock(ActionCreator.class);
CreateAction createAction = getCreateAction(actionCreator);
ServletActionContext actionContext = getActionContext();
ActionConfig actionConfig = newMock(ActionConfig.class);
ModuleConfig moduleConfig = newMock(ModuleConfig.class);
ActionServlet servlet = newMock(ActionServlet.class);
Map applicationScope = newMock(Map.class);
Map actions = new HashMap();
Action action = new Action();
expect(actionConfig.getModuleConfig()).andReturn(moduleConfig);
expect(moduleConfig.getPrefix()).andReturn("prefix");
expect(actionContext.getApplicationScope()).andReturn(applicationScope);
expect(applicationScope.get("actionsprefix")).andReturn(actions);
expect(actionCreator.createAction(String.class)).andReturn(action);
expect(actionContext.getActionServlet()).andReturn(servlet);