CompleteAutoloadTilesContainerFactory extends BasicTilesContainerFactory { @Override protected AttributeEvaluatorFactory createAttributeEvaluatorFactory(ApplicationContext applicationContext, LocaleResolver resolver) { BasicAttributeEvaluatorFactory attributeEvaluatorFactory = new BasicAttributeEvaluatorFactory( createELEvaluator(applicationContext)); attributeEvaluatorFactory.registerAttributeEvaluator("MVEL", createMVELEvaluator()); attributeEvaluatorFactory.registerAttributeEvaluator("OGNL", createOGNLEvaluator()); return attributeEvaluatorFactory; }  @Override TilesContainer createDecoratedContainer(TilesContainer originalContainer,
            ApplicationContext applicationContext);  }
@Test public void testCreateAttributeEvaluatorFactory() { ApplicationContext applicationContext = createMock(ApplicationContext.class); LocaleResolver resolver = createMock(LocaleResolver.class); ServletContext servletContext = createMock(ServletContext.class); JspFactory jspFactory = createMock(JspFactory.class); JspApplicationContext jspApplicationContext = createMock(JspApplicationContext.class); ExpressionFactory expressionFactory = createMock(ExpressionFactory.class); expect(applicationContext.getContext()).andReturn(servletContext); expect(jspFactory.getJspApplicationContext(servletContext)).andReturn(jspApplicationContext); expect(jspApplicationContext.getExpressionFactory()).andReturn(expressionFactory); replay(applicationContext, resolver, servletContext, jspFactory, jspApplicationContext, expressionFactory); JspFactory.setDefaultFactory(jspFactory); AttributeEvaluatorFactory attributeEvaluatorFactory = factory.createAttributeEvaluatorFactory( applicationContext, resolver); assertTrue(attributeEvaluatorFactory instanceof BasicAttributeEvaluatorFactory); assertNotNull(attributeEvaluatorFactory.getAttributeEvaluator("EL")); assertNotNull(attributeEvaluatorFactory.getAttributeEvaluator("MVEL")); assertNotNull(attributeEvaluatorFactory.getAttributeEvaluator("OGNL")); verify(applicationContext, resolver, servletContext, jspFactory, jspApplicationContext, expressionFactory); }