@Test
public void testWrite() throws IOException {

    StringWriter writer = new StringWriter();
    Request request = createMock(Request.class);
    requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
    expect(request.getContext(matches("request"))).andReturn(requestScope).anyTimes();
    expect(request.getApplicationContext()).andReturn(context);
    expect(request.getWriter()).andReturn(writer);
    replay(request);
    container
            .getAttributeContext(request)
            .putAttribute("test-fallback", new ListAttribute(){{
                add(new Attribute("Result"));
            }});
    OptionsRenderer renderer = new OptionsRenderer(context, new StringRenderer());
    renderer.render("{options[test-fallback]}", request);
    writer.close();
    assertEquals("Not written 'Result'", "Result", writer.toString());
    verify(request);
}