public void testWriteDefinition() throws IOException {
StringWriter writer = new StringWriter();
Attribute attribute = new Attribute("my.definition", 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);
EasyMock.expect(contextFactory.createRequestContext(applicationContext))
.andReturn(requestContext);
EasyMock.expect(container.isValidDefinition("my.definition"))
.andReturn(Boolean.TRUE);
container.render("my.definition");
EasyMock.replay(applicationContext, contextFactory, requestContext,