@Override
  public String toString() {
    return partitionMaps.entrySet().stream()
        .flatMap(this::toStrings)
        .collect(Collectors.joining(", ", "{", "}"));
  }
@Test
  public void testToString() {
    PartitionMap<String> map = PartitionMap.create(SPECS);

    // empty map
    assertThat(map.toString()).isEqualTo("{}");

    // single entry
    map.put(BY_DATA_SPEC.specId(), Row.of("aaa"), "v1");
    assertThat(map.toString()).isEqualTo("{data=aaa -> v1}");

    // multiple entries
    map.put(BY_DATA_SPEC.specId(), CustomRow.of("bbb"), "v2");
    map.put(BY_DATA_CATEGORY_BUCKET_SPEC.specId(), Row.of("ccc", 2), "v3");
    assertThat(map.toString())
        .contains("data=aaa -> v1")
        .contains("data=bbb -> v2")
        .contains("data=ccc/category_bucket=2 -> v3");
  }