public static CallRoutingTable fromJson(final Reader inputReader) throws IOException {
    try (final BufferedReader reader = new BufferedReader(inputReader)) {
      RawCallRoutingTable rawTable = objectMapper.readValue(reader, RawCallRoutingTable.class);

      Map<CidrBlock.IpV4CidrBlock, List<String>> ipv4SubnetToDatacenter = rawTable.ipv4SubnetsToDatacenters
          .entrySet()
          .stream()
          .collect(Collectors.toUnmodifiableMap(
              e -> (CidrBlock.IpV4CidrBlock) CidrBlock.parseCidrBlock(e.getKey(), IPV4_DEFAULT_BLOCK_SIZE),
                  Map.Entry::getValue
          ));

      Map<CidrBlock.IpV6CidrBlock, List<String>> ipv6SubnetToDatacenter = rawTable.ipv6SubnetsToDatacenters
          .entrySet()
          .stream()
          .collect(Collectors.toUnmodifiableMap(
              e -> (CidrBlock.IpV6CidrBlock) CidrBlock.parseCidrBlock(e.getKey(), IPV6_DEFAULT_BLOCK_SIZE),
              Map.Entry::getValue
          ));

      Map<CallRoutingTable.GeoKey, List<String>> geoToDatacenter = Stream.concat(
          rawTable.ipv4GeoToDataCenters
              .entrySet()
              .stream()
              .map(e -> Map.entry(parseRawGeoKey(e.getKey(), CallRoutingTable.Protocol.v4), e.getValue())),
          rawTable.ipv6GeoToDataCenters
              .entrySet()
              .stream()
              .map(e -> Map.entry(parseRawGeoKey(e.getKey(), CallRoutingTable.Protocol.v6), e.getValue()))
      ).collect(Collectors.toUnmodifiableMap(Map.Entry::getKey, Map.Entry::getValue));

      return new CallRoutingTable(
          ipv4SubnetToDatacenter,
          ipv6SubnetToDatacenter,
          geoToDatacenter
      );
    }
  }
@Test
  public void testParseVariousEdgeCases() throws IOException {
    var input =
        """
            {
            	"ipv4GeoToDataCenters": {},
            	"ipv6GeoToDataCenters": {},
            	"ipv4SubnetsToDatacenters": {},
            	"ipv6SubnetsToDatacenters": {}
            }
        """;
    assertThat(CallRoutingTableParser.fromJson(new StringReader(input))).isEqualTo(CallRoutingTable.empty());
    assertThat(CallRoutingTableParser.fromJson(new StringReader("{}"))).isEqualTo(CallRoutingTable.empty());
  }