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

    assertThatThrownBy(() -> S3SignRequestParser.fromJson("{\"region\":\"us-west-2\"}"))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse missing string: method");

    assertThatThrownBy(
            () -> S3SignRequestParser.fromJson("{\"region\":\"us-west-2\", \"method\" : \"PUT\"}"))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse missing string: uri");

    assertThatThrownBy(
            () ->
                S3SignRequestParser.fromJson(
                    "{\n"
                        + "  \"region\" : \"us-west-2\",\n"
                        + "  \"method\" : \"PUT\",\n"
                        + "  \"uri\" : \"http://localhost:49208/iceberg-signer-test\"\n"
                        + "}"))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse missing field: headers");
  }