@Test
public void testHandleActionPerform() throws Exception
{
ControllerAction action = createStrictMock(ControllerAction.class);
HttpServletRequest request = createStrictMock(HttpServletRequest.class);
TestAction actionBean = createStrictMock(TestAction.class);
ActionBeanSource beanSource = createStrictMock(ActionBeanSource.class);
ActionContext actionContext = new TestContextImpl(request);
// check the expected order of method invocation
expect(action.getBeanSource()).andReturn(beanSource);
expect(beanSource.createBean(actionContext)).andReturn(actionBean);
action.preExecute(actionBean, actionContext);
expect(action.getBeforeInterceptors()).andReturn(null);
expect(action.executeController(actionBean, actionContext)).andReturn(null);
expect(action.getAfterInterceptors()).andReturn(null);
request.setAttribute(InfrastructureKeys.ACTION_BEAN, actionBean);
// request.setAttribute(InfrastructureKeys.ACTION_FORWARD, null);
action.postExecute(actionBean, actionContext, null);
replay(action);
replay(request);