public List<String> getDatacentersByGeo(
      String continent,
      String country,
      Optional<String> subdivision
  ) {
    GeoKey v4Key = new GeoKey(continent, country, subdivision, Protocol.v4);
    List<String> v4Options = this.geoToDatacenter.getOrDefault(v4Key, Collections.emptyList());
    List<String> v4OptionsBackup = v4Options.isEmpty() && subdivision.isPresent() ?
        this.geoToDatacenter.getOrDefault(
            new GeoKey(continent, country, Optional.empty(), Protocol.v4),
            Collections.emptyList())
        : Collections.emptyList();

    GeoKey v6Key = new GeoKey(continent, country, subdivision, Protocol.v6);
    List<String> v6Options = this.geoToDatacenter.getOrDefault(v6Key, Collections.emptyList());
    List<String> v6OptionsBackup = v6Options.isEmpty() && subdivision.isPresent() ?
        this.geoToDatacenter.getOrDefault(
            new GeoKey(continent, country, Optional.empty(), Protocol.v6),
            Collections.emptyList())
        : Collections.emptyList();

    return Stream.of(
            v4Options.stream(),
            v6Options.stream(),
            v4OptionsBackup.stream(),
            v6OptionsBackup.stream()
        )
        .flatMap(Function.identity())
        .distinct()
        .toList();
  }
@Test
  void testGetFastestDataCentersByGeoFallback() {
    var actualExactMatch = basicTable.getDatacentersByGeo("NA", "US", Optional.of("VA"));
    assertThat(actualExactMatch).isEqualTo(List.of("datacenter-2", "datacenter-1"));

    var actualApproximateMatch = basicTable.getDatacentersByGeo("NA", "US", Optional.of("MD"));
    assertThat(actualApproximateMatch).isEqualTo(List.of("datacenter-3", "datacenter-4"));
  }