RenderPortletRequest extends PortletRequest { public RenderPortletRequest(ApplicationContext applicationContext, PortletContext context, RenderRequest request, RenderResponse response) { super(applicationContext, context, request, response, new PortletRequestDelegate(request), new MimeResponseDelegate( response)); } RenderPortletRequest(ApplicationContext applicationContext,
            PortletContext context, RenderRequest request,
            RenderResponse response);   }
@Test public void testRenderPortletRequest() throws NoSuchFieldException, IllegalAccessException { ApplicationContext applicationContext = createMock(ApplicationContext.class); PortletContext portletContext = createMock(PortletContext.class); RenderRequest request = createMock(RenderRequest.class); RenderResponse response = createMock(RenderResponse.class); replay(applicationContext, portletContext, request, response); RenderPortletRequest req = new RenderPortletRequest(applicationContext, portletContext, request, response); Class<? extends RenderPortletRequest> clazz = req.getClass(); Field field = clazz.getSuperclass().getDeclaredField("requestDelegate"); assertTrue(field.get(req) instanceof PortletRequestDelegate); field = clazz.getSuperclass().getDeclaredField("responseDelegate"); assertTrue(field.get(req) instanceof MimeResponseDelegate); verify(applicationContext, portletContext, request, response); }