@Test(expected = IOException.class)
public void testDoIncludeServletException() throws IOException, ServletException {

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