### Question:
Expressions { public static Map<String, Object> evaluate(Map<String, Object> map, Bindings bindings) throws ExpressionException { Map<String, Object> result = new LinkedHashMap<>(map.size()); for (Map.Entry<String, Object> entry : map.entrySet()) { result.put(entry.getKey(), evaluate(entry.getValue(), bindings)); } return result; } private  Expressions(); static Map<String, Object> evaluate(Map<String, Object> map, Bindings bindings); static List<Object> evaluate(List<Object> list, Bindings bindings); static Object evaluate(String value, Bindings bindings); @SuppressWarnings("unchecked") static Object evaluate(Object value, Bindings bindings);  }### Answer:
@Test public void shouldEvaluateBasicStringConfiguration() throws Exception { Map<String, Object> args = json(object(field("ultimateAnswer", "${5*8+2}"))).asMap(); final Map<String, Object> evaluated = evaluate(args, bindings()); assertThat(evaluated).containsOnly(entry("ultimateAnswer", 42L)); }
@Test public void shouldEvaluateArrayConfiguration() throws Exception { Map<String, Object> args = json(object(field("ultimateAnswer", array("${5*8+2}", 1515, "${decodeBase64('Rm9yZ2VSb2Nr')}")))).asMap(); final Map<String, Object> evaluated = evaluate(args, bindings()); assertThat(evaluated).containsOnly(entry("ultimateAnswer", asList(42L, 1515, "ForgeRock"))); }
@Test public void shouldEvaluateObjectConfiguration() throws Exception { Map<String, Object> args; args = json(object(field("ultimateAnswer", object(field("rockstar", "${decodeBase64('Rm9yZ2VSb2Nr')}"))))).asMap(); final Map<String, Object> evaluated = evaluate(args, bindings()); assertThat(evaluated).containsOnly(entry("ultimateAnswer", singletonMap("rockstar", "ForgeRock"))); }