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

    VelocityView view = createMock(VelocityView.class);
    ServletRequest request = createMock(ServletRequest.class);
    replay(view, request);
    Renderer renderer = new VelocityRenderer(view);
    try {
        renderer.render(null, request);
    } finally {
        verify(view, request);
    }
}