ELContextImpl extends ELContext { @Override public VariableMapper getVariableMapper() { if (this.variableMapper == null) { this.variableMapper = new VariableMapperImpl(); } return this.variableMapper; } ELContextImpl(ELResolver resolver); @Override ELResolver getELResolver(); @Override FunctionMapper getFunctionMapper(); @Override VariableMapper getVariableMapper(); void setFunctionMapper(FunctionMapper functionMapper); void setVariableMapper(VariableMapper variableMapper);  }
@Test public void testVariableMapperImpl() { ValueExpression expression = createMock(ValueExpression.class); replay(resolver, expression); VariableMapper variableMapper = context.getVariableMapper(); assertNull(variableMapper.resolveVariable("whatever")); variableMapper.setVariable("var", expression); assertEquals(expression, variableMapper.resolveVariable("var")); verify(resolver, expression); }