// tryExecute should fail on non-integer property class
assertEquals(AbstractExecutor.TRY_FAILED, set.tryExecute(list, "eulav", "nope"));
}
public void testMapIntrospection() throws Exception {
Uberspect uber = JexlEngine.getUberspect(null);
Introspector intro = (Introspector) uber;
Map<String, Object> map = new HashMap<String, Object>();
map.put("value", "MAP");
map.put("eulav", "PAM");
AbstractExecutor.Get get = intro.getGetExecutor(map, "value");
AbstractExecutor.Set set = intro.getSetExecutor(map, "value", "foo");
assertTrue("map property getter", get instanceof MapGetExecutor);
assertTrue("map property setter", set instanceof MapSetExecutor);
// introspector and uberspect should return same result
assertEquals(get, uber.getPropertyGet(map, "value", null));
assertEquals(set, uber.getPropertySet(map, "value", "foo", null));
// different property should return different setter/getter
assertFalse(get.equals(intro.getGetExecutor(map, "eulav")));
assertFalse(get.equals(intro.getSetExecutor(map, "eulav", "foo")));
// setter returns argument
Object bar = set.execute(map, "bar");