public Object resolve(final Expression expression) {
    return new Visitor().process(expression, null);
  }
@Test
  public void shouldThrowIfCannotParseDate() {
    // Given:
    final SqlType type = SqlTypes.DATE;
    final Expression exp = new StringLiteral("abc");

    // When:
    final KsqlException e = assertThrows(
        KsqlException.class,
        () -> new GenericExpressionResolver(type, FIELD_NAME, registry, config, "insert value",
            false).resolve(exp));

    // Then:
    assertThat(e.getMessage(), containsString("Date format must be yyyy-mm-dd"));
  }