@Test(expected = CannotRenderException.class)
public void testRenderException() throws IOException {

    Request requestContext = createMock(Request.class);
    replay(requestContext, container);
    try {
        renderer.render(null, requestContext);
    } finally {
        verify(requestContext, container);
    }
}