static SQLViewRepresentation fromJson(String json) {
    return JsonUtil.parse(json, SQLViewRepresentationParser::fromJson);
  }
@Test
  public void testParseSqlViewRepresentation() {
    String requiredFields =
        "{\"type\":\"sql\", \"sql\": \"select * from foo\", \"dialect\": \"spark-sql\"}";
    SQLViewRepresentation viewRepresentation =
        ImmutableSQLViewRepresentation.builder()
            .sql("select * from foo")
            .dialect("spark-sql")
            .build();

    assertThat(SQLViewRepresentationParser.fromJson(requiredFields))
        .as("Should be able to parse valid SQL view representation")
        .isEqualTo(viewRepresentation);

    String requiredAndOptionalFields =
        "{\"type\":\"sql\", \"sql\": \"select * from foo\", \"dialect\": \"spark-sql\"}";

    SQLViewRepresentation viewWithOptionalFields =
        ImmutableSQLViewRepresentation.builder()
            .sql("select * from foo")
            .dialect("spark-sql")
            .build();
    assertThat(SQLViewRepresentationParser.fromJson(requiredAndOptionalFields))
        .as("Should be able to parse valid SQL view representation")
        .isEqualTo(viewWithOptionalFields);
  }