@VisibleForTesting
  Object evaluate(final GenericRow row) {
    return term.getValue(new TermEvaluationContext(row));
  }
@Test
  public void shouldEvaluateSearchedCase() {
    // Given:
    final Expression case1 = new SearchedCaseExpression(
        ImmutableList.of(
            new WhenClause(
                new ComparisonExpression(
                    ComparisonExpression.Type.GREATER_THAN,
                    COL7,
                    new IntegerLiteral(10)
                ),
                new StringLiteral("Large")
            ),
            new WhenClause(
                new ComparisonExpression(
                    ComparisonExpression.Type.GREATER_THAN,
                    COL7,
                    new IntegerLiteral(5)
                ),
                new StringLiteral("Medium")
            ),
            new WhenClause(
                new ComparisonExpression(
                    ComparisonExpression.Type.GREATER_THAN,
                    COL7,
                    new IntegerLiteral(2)
                ),
                new StringLiteral("Small")
            )
        ),
        Optional.of(new StringLiteral("Tiny"))
    );
    final Expression case2 = new SearchedCaseExpression(
        ImmutableList.of(
            new WhenClause(
                new ComparisonExpression(
                    ComparisonExpression.Type.LESS_THAN,
                    COL7,
                    new IntegerLiteral(6)
                ),
                new StringLiteral("Blah")
            )
        ),
        Optional.empty()
    );

    // When:
    InterpretedExpression interpreter1 = interpreter(case1);
    InterpretedExpression interpreter2 = interpreter(case2);

    // Then:
    assertThat(interpreter1.evaluate(make(7, 12)), is("Large"));
    assertThat(interpreter1.evaluate(make(7, 9)), is("Medium"));
    assertThat(interpreter1.evaluate(make(7, 3)), is("Small"));
    assertThat(interpreter1.evaluate(make(7, 1)), is("Tiny"));
    assertThat(interpreter2.evaluate(make(7, 1)), is("Blah"));
    assertThat(interpreter2.evaluate(make(7, 10)), nullValue());
  }