public Object resolve(final Expression expression) {
    return new Visitor().process(expression, null);
  }
@Test
  public void shouldThrowIfCannotCoerce() {
    // Given:
    final SqlType type = SqlTypes.array(SqlTypes.INTEGER);
    final Expression exp = new IntegerLiteral(1);

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

    // Then:
    assertThat(e.getMessage(), containsString("Expected type ARRAY<INTEGER> for field `FOO` but got INTEGER(1)"));
  }