StringWriter writer = new StringWriter();
Attribute attribute = new Attribute("my.definition", (Expression) null,
null, "definition");
TilesApplicationContext applicationContext = EasyMock
.createMock(TilesApplicationContext.class);
TilesRequestContextFactory contextFactory = EasyMock
.createMock(TilesRequestContextFactory.class);
TilesContainer container = EasyMock.createMock(TilesContainer.class);
TilesRequestContext requestContext = EasyMock
.createMock(TilesRequestContext.class);
Object[] requestObjects = new Object[0];
EasyMock.expect(requestContext.getRequestObjects()).andReturn(requestObjects);
EasyMock.expect(contextFactory.createRequestContext(applicationContext))
.andReturn(requestContext);
container.render("my.definition");
EasyMock.replay(applicationContext, contextFactory, requestContext,
container);
renderer.setApplicationContext(applicationContext);