@VisibleForTesting
  Object evaluate(final GenericRow row) {
    return term.getValue(new TermEvaluationContext(row));
  }
@Test
  public void shouldEvaluateLambda_functionCall() {
    // Given:
    final UdfFactory udfFactory = mock(UdfFactory.class);
    final KsqlScalarFunction udf = mock(KsqlScalarFunction.class);
    when(udf.newInstance(any())).thenReturn(new TransFormUdf());
    givenUdf("TRANSFORM", udfFactory, udf);
    when(udf.parameters()).thenReturn(ImmutableList.of(ArrayType.of(IntegerType.INSTANCE),
        LambdaType.of(ImmutableList.of(IntegerType.INSTANCE), IntegerType.INSTANCE)));
    when(udf.getReturnType(any())).thenReturn(SqlTypes.array(SqlTypes.INTEGER));

    // When:
    InterpretedExpression interpreter1 = interpreter(
        new FunctionCall(
            FunctionName.of("TRANSFORM"),
            ImmutableList.of(
                new CreateArrayExpression(ImmutableList.of(
                    new IntegerLiteral(1), new IntegerLiteral(2))),
                new LambdaFunctionCall(
                    ImmutableList.of("X"),
                    new ArithmeticBinaryExpression(
                        Operator.ADD, new IntegerLiteral(1),
                        new LambdaVariable("X")
                    )
                )
            )
        )
    );

    // Then:
    assertThat(interpreter1.evaluate(ROW), is(ImmutableList.of(2, 3)));
  }