static ViewRepresentation fromJson(String json) {
    return JsonUtil.parse(json, ViewRepresentationParser::fromJson);
  }
@Test
  public void testViewRepresentationMissingType() {
    assertThatThrownBy(() -> ViewRepresentationParser.fromJson("{\"sql\":\"select * from foo\"}"))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse missing string: type");
  }