@Test public void resolveExpressionsMap_should_keepExpressionContent_when_MapContainsAnExpressionUnableToBeResolved() { Expression playerExpression = buildExpression("${player}"); given(expressionEvaluator.evaluate(playerExpression, expressionManager, delegateInterceptor)).willThrow(new ActivitiException("Invalid property")); Map<String, Object> players = map( "Red", "John", "Green", "Peter", "Blue", "Mary", "Yellow", "${player}" ); Map<String, Object> result = expressionResolver.resolveExpressionsMap(expressionEvaluator, singletonMap("players",players)); assertThat(result).containsEntry("players", players); }
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);  }