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

    DispatchRequest requestContext = createMock(DispatchRequest.class);
    replay(requestContext);
    renderer.render(null, requestContext);
    verify(requestContext);
}