public static SortOrder fromJson(Schema schema, String json) {
    return fromJson(json).bind(schema);
  }
@TestTemplate
  public void invalidSortDirection() {
    String jsonString =
        "{\n"
            + "  \"order-id\" : 10,\n"
            + "  \"fields\" : [ {\n"
            + "    \"transform\" : \"custom_transform\",\n"
            + "    \"source-id\" : 2,\n"
            + "    \"direction\" : \"invalid\",\n"
            + "    \"null-order\" : \"nulls-first\"\n"
            + "  } ]\n"
            + "}";

    assertThatThrownBy(() -> SortOrderParser.fromJson(table.schema(), jsonString))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Invalid sort direction: invalid");
  }