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

    Request request = createMock(Request.class);
    replay(request);
    Renderer renderer = new MustacheRenderer();
    try {
        renderer.render(null, request);
    } finally {
        verify(request);
    }
}