@VisibleForTesting
  Object evaluate(final GenericRow row) {
    return term.getValue(new TermEvaluationContext(row));
  }
@Test
  public void shouldEvaluateCastToTimestamp() {
    // Given:
    final Expression cast1 = new Cast(
        new TimestampLiteral(Timestamp.from(Instant.ofEpochMilli(1000))),
        new Type(SqlPrimitiveType.of("TIMESTAMP"))
    );
    final Expression cast2 = new Cast(
        new StringLiteral("2017-11-13T23:59:58"),
        new Type(SqlPrimitiveType.of("TIMESTAMP"))
    );
    final Expression cast3 = new Cast(
        new DateLiteral(new Date(864000000)),
        new Type(SqlPrimitiveType.of("TIMESTAMP"))
    );

    // When:
    InterpretedExpression interpreter1 = interpreter(cast1);
    InterpretedExpression interpreter2 = interpreter(cast2);
    InterpretedExpression interpreter3 = interpreter(cast3);

    // Then:
    assertThat(interpreter1.evaluate(ROW), is(new Timestamp(1000L)));
    assertThat(interpreter2.evaluate(ROW), is(new Timestamp(1510617598000L)));
    assertThat(interpreter3.evaluate(ROW), is(new Timestamp(864000000)));
  }