@Test(expected = PreparerException.class)
public void testExecuteException() throws IOException {

    DispatchRequest requestContext = createMock(DispatchRequest.class);
    AttributeContext attributeContext = createMock(AttributeContext.class);
    requestContext.include("/my/url.do");
    expectLastCall().andThrow(new IOException());
    replay(requestContext, attributeContext);
    try {
        preparer.execute(requestContext, attributeContext);
    } finally {
        verify(requestContext, attributeContext);
    }
}