assertEquals("fooAPPLEbar", result2);
}
@Test
public void testBug51177ObjectMap() {
ExpressionFactory factory = ExpressionFactory.newInstance();
ELContext context = new ELContextImpl();
Object o1 = "String value";
Object o2 = Integer.valueOf(32);
Map<Object,Object> map = new HashMap<Object,Object>();
map.put("key1", o1);
map.put("key2", o2);
ValueExpression var =
factory.createValueExpression(map, Map.class);
context.getVariableMapper().setVariable("map", var);
ValueExpression ve1 = factory.createValueExpression(
context, "${map.key1}", Object.class);
ve1.setValue(context, o2);
assertEquals(o2, ve1.getValue(context));
ValueExpression ve2 = factory.createValueExpression(
context, "${map.key2}", Object.class);
ve2.setValue(context, o1);
assertEquals(o1, ve2.getValue(context));
}