### Question:
ExpressionTransform { public List transformList( List source, EvaluationContext evaluationContext, ExpressionEvaluationSummary summary, Map<String, Object> additionalContext) { List<Object> result = new ArrayList<>(); for (Object obj : source) { if (obj instanceof Map) { result.add(transformMap((Map<String, Object>) obj, evaluationContext, summary)); } else if (obj instanceof List) { result.add(transformList((List) obj, evaluationContext, summary, additionalContext)); } else { result.add(transform(obj, evaluationContext, summary, additionalContext)); } } return result; } ExpressionTransform(
      ParserContext parserContext,
      ExpressionParser parser,
      Function<String, String> stringExpressionPreprocessor,
      Class<?>... typesToStringify); static String escapeSimpleExpression(String expression); Map<String, Object> transformMap(
      Map<String, Object> source,
      EvaluationContext evaluationContext,
      ExpressionEvaluationSummary summary); List transformList(
      List source,
      EvaluationContext evaluationContext,
      ExpressionEvaluationSummary summary,
      Map<String, Object> additionalContext); String transformString(
      String source, EvaluationContext evaluationContext, ExpressionEvaluationSummary summary);  }### Answer:
@Test void evaluateList() { List<Object> input = Collections.singletonList("value"); List<?> evaluated = new ExpressionTransform(parserContext, parser, Function.identity()) .transformList( input, new StandardEvaluationContext(), new ExpressionEvaluationSummary(), Collections.emptyMap()); assertThat(evaluated).isEqualTo(input); }
@Test void evaluateNestedList() { ExpressionEvaluationSummary summary = new ExpressionEvaluationSummary(); List<Object> input = Collections.singletonList(Collections.singletonList("value")); List<?> evaluated = new ExpressionTransform(parserContext, parser, Function.identity()) .transformList(input, new StandardEvaluationContext(), summary, Collections.emptyMap()); assertThat(evaluated).isEqualTo(input); }
@Test void evaluateListWithNestedMap() { List<Object> input = Collections.singletonList(Collections.singletonMap("key", "value")); List<?> evaluated = new ExpressionTransform(parserContext, parser, Function.identity()) .transformList( input, new StandardEvaluationContext(), new ExpressionEvaluationSummary(), Collections.emptyMap()); assertThat(evaluated).isEqualTo(input); }