public void testWriteTemplate() throws IOException {
StringWriter writer = new StringWriter();
Attribute attribute = new Attribute("/myTemplate.jsp", null, null, "template");
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);
Object[] requestObjects = new Object[0];
EasyMock.expect(requestContext.getRequestObjects()).andReturn(requestObjects);
requestContext.dispatch("/myTemplate.jsp");
EasyMock.expect(container.isValidDefinition("my.definition"))