@Test
public void testWrite() throws IOException {

    StringWriter writer = new StringWriter();
    Request requestContext = createMock(Request.class);
    expect(requestContext.getWriter()).andReturn(writer);
    replay(requestContext);
    renderer.render("Result", requestContext);
    writer.close();
    assertEquals("Not written 'Result'", "Result", writer.toString());
    verify(requestContext);
}