ActionPortletRequest extends PortletRequest { public ActionPortletRequest(ApplicationContext applicationContext, PortletContext context, ActionRequest request, ActionResponse response) { super(applicationContext, context, request, response, new StateAwareRequestDelegate(request, response), new StateAwareResponseDelegate()); } ActionPortletRequest(ApplicationContext applicationContext,
            PortletContext context, ActionRequest request, ActionResponse response);   }
@Test public void testActionPortletRequest() throws NoSuchFieldException, IllegalAccessException { ApplicationContext applicationContext = createMock(ApplicationContext.class); PortletContext portletContext = createMock(PortletContext.class); ActionRequest request = createMock(ActionRequest.class); ActionResponse response = createMock(ActionResponse.class); replay(applicationContext, portletContext, request, response); ActionPortletRequest req = new ActionPortletRequest(applicationContext, portletContext, request, response); Class<? extends ActionPortletRequest> clazz = req.getClass(); Field field = clazz.getSuperclass().getDeclaredField("requestDelegate"); assertTrue(field.get(req) instanceof StateAwareRequestDelegate); field = clazz.getSuperclass().getDeclaredField("responseDelegate"); assertTrue(field.get(req) instanceof StateAwareResponseDelegate); verify(applicationContext, portletContext, request, response); }