@Test public void resolveExpressionsMap_should_replaceExpressionByValue_when_stringIsAnExpression() { Expression expression = buildExpression("${name}"); given(expressionEvaluator.evaluate(expression, expressionManager, delegateInterceptor)).willReturn("John"); Map<String, Object> result = expressionResolver.resolveExpressionsMap(expressionEvaluator, singletonMap("name", "${name}")); assertThat(result).containsEntry("name", "John"); }
public Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator, final Map<String, ?> sourceMap) { final Map<String, Object> result = new LinkedHashMap<>(); sourceMap.forEach((key, value) -> result.put(key, resolveExpressions(expressionEvaluator, value))); return result; }
ExpressionResolver { public Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator, final Map<String, ?> sourceMap) { final Map<String, Object> result = new LinkedHashMap<>(); sourceMap.forEach((key, value) -> result.put(key, resolveExpressions(expressionEvaluator, value))); return result; } }
ExpressionResolver { public Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator, final Map<String, ?> sourceMap) { final Map<String, Object> result = new LinkedHashMap<>(); sourceMap.forEach((key, value) -> result.put(key, resolveExpressions(expressionEvaluator, value))); return result; } ExpressionResolver(ExpressionManager expressionManager,
        ObjectMapper mapper,
        DelegateInterceptor delegateInterceptor); }
ExpressionResolver { public Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator, final Map<String, ?> sourceMap) { final Map<String, Object> result = new LinkedHashMap<>(); sourceMap.forEach((key, value) -> result.put(key, resolveExpressions(expressionEvaluator, value))); return result; } ExpressionResolver(ExpressionManager expressionManager,
        ObjectMapper mapper,
        DelegateInterceptor delegateInterceptor); Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator,
                                                     final Map<String, ?> sourceMap); boolean containsExpression(final Object source); }
ExpressionResolver { public Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator, final Map<String, ?> sourceMap) { final Map<String, Object> result = new LinkedHashMap<>(); sourceMap.forEach((key, value) -> result.put(key, resolveExpressions(expressionEvaluator, value))); return result; } ExpressionResolver(ExpressionManager expressionManager,
        ObjectMapper mapper,
        DelegateInterceptor delegateInterceptor); Map<String, Object> resolveExpressionsMap(final ExpressionEvaluator expressionEvaluator,
                                                     final Map<String, ?> sourceMap); boolean containsExpression(final Object source);  }