public List<String> getDatacentersFor(
      InetAddress address,
      String continent,
      String country,
      Optional<String> subdivision
  ) {
    final int NUM_DATACENTERS = 3;

    if(this.isEmpty()) {
      return Collections.emptyList();
    }

    List<String> dcsBySubnet = getDatacentersBySubnet(address);
    List<String> dcsByGeo = getDatacentersByGeo(continent, country, subdivision).stream()
        .limit(NUM_DATACENTERS)
        .filter(dc ->
            (dcsBySubnet.isEmpty() || !dc.equals(dcsBySubnet.getFirst()))
                && (dcsBySubnet.size() < 2 || !dc.equals(dcsBySubnet.get(1)))
        ).toList();

    return Stream.concat(
            dcsBySubnet.stream().limit(dcsByGeo.isEmpty() ? NUM_DATACENTERS : NUM_DATACENTERS - 1),
            dcsByGeo.stream())
        .limit(NUM_DATACENTERS)
        .toList();
  }
@Test
  void testGetFastestDatacentersPrioritizesSubnet() throws UnknownHostException {
    var v4address = Inet4Address.getByName("1.123.123.1");
    var actual = basicTable.getDatacentersFor(v4address, "NA", "US", Optional.of("VA"));
    assertThat(actual).isEqualTo(List.of("datacenter-4", "datacenter-2", "datacenter-1"));
  }