public static CommitReport fromJson(String json) {
    return JsonUtil.parse(json, CommitReportParser::fromJson);
  }
@Test
  public void missingFields() {
    assertThatThrownBy(() -> CommitReportParser.fromJson("{}"))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse missing string: table-name");

    assertThatThrownBy(() -> CommitReportParser.fromJson("{\"table-name\":\"roundTripTableName\"}"))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse missing long: snapshot-id");

    assertThatThrownBy(
            () ->
                CommitReportParser.fromJson(
                    "{\"table-name\":\"roundTripTableName\",\"snapshot-id\":23}"))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse missing long: sequence-number");

    assertThatThrownBy(
            () ->
                CommitReportParser.fromJson(
                    "{\"table-name\":\"roundTripTableName\",\"snapshot-id\":23,\"sequence-number\":24}"))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse missing string: operation");

    assertThatThrownBy(
            () ->
                CommitReportParser.fromJson(
                    "{\"table-name\":\"roundTripTableName\",\"snapshot-id\":23,\"sequence-number\":24, \"operation\": \"DELETE\"}"))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse missing field: metrics");
  }