@Test(expected = IOException.class)
public void testDoIncludePortletException() throws IOException, PortletException {

    PortletRequestDispatcher rd = createMock(PortletRequestDispatcher.class);
    expect(portletContext.getRequestDispatcher("/my/path")).andReturn(rd);
    rd.include(request, response);
    expectLastCall().andThrow(new PortletException());
    replay(applicationContext, request, response, rd, portletContext, requestDelegate, responseDelegate);
    try {
        req.doInclude("/my/path");
    } finally {
        verify(applicationContext, request, response, rd, portletContext, requestDelegate, responseDelegate);
    }
}