@Test
public void testCreateDefaultAttributeRenderer() {

    ApplicationContext applicationContext = createMock(ApplicationContext.class);
    TilesContainer container = createMock(TilesContainer.class);
    AttributeEvaluatorFactory attributeEvaluatorFactory = createMock(AttributeEvaluatorFactory.class);
    BasicRendererFactory rendererFactory = createMock(BasicRendererFactory.class);
    Renderer stringRenderer = createMock(Renderer.class);
    Renderer templateRenderer = createMock(Renderer.class);
    Renderer definitionRenderer = createMock(Renderer.class);
    Renderer velocityRenderer = createMock(Renderer.class);
    Renderer freemarkerRenderer = createMock(Renderer.class);
    Renderer mustacheRenderer = createMock(Renderer.class);
    expect(rendererFactory.getRenderer("string")).andReturn(stringRenderer);
    expect(rendererFactory.getRenderer("template")).andReturn(templateRenderer);
    expect(rendererFactory.getRenderer("definition")).andReturn(definitionRenderer);
    expect(rendererFactory.getRenderer("velocity")).andReturn(velocityRenderer);
    expect(rendererFactory.getRenderer("freemarker")).andReturn(freemarkerRenderer);
    expect(rendererFactory.getRenderer("mustache")).andReturn(mustacheRenderer);
    replay(container, attributeEvaluatorFactory, rendererFactory, applicationContext);
    Renderer renderer = factory.createDefaultAttributeRenderer(rendererFactory, applicationContext, container,
            attributeEvaluatorFactory);
    assertTrue("The default renderer class is not correct", renderer instanceof ChainedDelegateRenderer);
    verify(container, attributeEvaluatorFactory, rendererFactory, applicationContext);
}