@Test
public void testEventPortletRequest() throws NoSuchFieldException, IllegalAccessException {

    ApplicationContext applicationContext = createMock(ApplicationContext.class);
    PortletContext portletContext = createMock(PortletContext.class);
    EventRequest request = createMock(EventRequest.class);
    EventResponse response = createMock(EventResponse.class);
    replay(applicationContext, portletContext, request, response);
    EventPortletRequest req = new EventPortletRequest(applicationContext,
            portletContext, request, response);
    Class<? extends EventPortletRequest> 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);
}