*/
@SuppressWarnings("deprecation")
@Test
public void testRegisterAttributeRenderers() {
BasicRendererFactory rendererFactory = createMock(BasicRendererFactory.class);
ServletTilesApplicationContext applicationContext = createMock(ServletTilesApplicationContext.class);
TilesRequestContextFactory contextFactory = createMock(TilesRequestContextFactory.class);
TilesContainer container = createMock(TilesContainer.class);
AttributeEvaluatorFactory attributeEvaluatorFactory = createMock(AttributeEvaluatorFactory.class);
ServletContext servletContext = createMock(ServletContext.class);
rendererFactory.registerRenderer(eq("string"),
isA(StringAttributeRenderer.class));
rendererFactory.registerRenderer(eq("template"),
isA(TemplateAttributeRenderer.class));
rendererFactory.registerRenderer(eq("definition"),
isA(DefinitionAttributeRenderer.class));
rendererFactory.registerRenderer(eq("freemarker"),
isA(FreeMarkerAttributeRenderer.class));
rendererFactory.registerRenderer(eq("velocity"),
isA(VelocityAttributeRenderer.class));
expect(applicationContext.getContext()).andReturn(servletContext)
.anyTimes();
expect(servletContext.getInitParameter(VelocityView.PROPERTIES_KEY))
.andReturn(null);
expect(servletContext.getInitParameter(VelocityView.TOOLS_KEY))
.andReturn(null);