public SortOrder sortOrder() {
    return sortOrdersById.get(defaultSortOrderId);
  }
@Test
  public void testSortOrder() {
    Schema schema = new Schema(Types.NestedField.required(10, "x", Types.StringType.get()));

    TableMetadata meta =
        TableMetadata.newTableMetadata(
            schema, PartitionSpec.unpartitioned(), null, ImmutableMap.of());
    assertThat(meta.sortOrder().isUnsorted()).isTrue();
    assertThat(meta.replaceSortOrder(SortOrder.unsorted()))
        .as("Should detect identical unsorted order")
        .isSameAs(meta);
  }