@Test
  public void test_RingTopology() {

    int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(4);

    final Set<String> site1LocatorsPort = new HashSet<>();
    final Set<String> site11LocatorsPort = new HashSet<>();

    site1LocatorsPort.add("localhost[" + ports[0] + "]");
    site11LocatorsPort
        .add("localhost[" + ports[0] + "],server=true,peer=true,hostname-for-clients=localhost");

    final Set<String> site2LocatorsPort = new HashSet<>();
    final Set<String> site22LocatorsPort = new HashSet<>();

    site2LocatorsPort.add("localhost[" + ports[1] + "]");
    site22LocatorsPort
        .add("localhost[" + ports[1] + "],server=true,peer=true,hostname-for-clients=localhost");

    final Set<String> site3LocatorsPort = new HashSet<>();
    final Set<String> site33LocatorsPort = new HashSet<>();

    site3LocatorsPort.add("localhost[" + ports[2] + "]");
    site33LocatorsPort
        .add("localhost[" + ports[2] + "],server=true,peer=true,hostname-for-clients=localhost");

    final Set<String> site4LocatorsPort = new HashSet<>();
    final Set<String> site44LocatorsPort = new HashSet<>();

    site4LocatorsPort.add("localhost[" + ports[3] + "]");
    site44LocatorsPort
        .add("localhost[" + ports[3] + "],server=true,peer=true,hostname-for-clients=localhost");

    Map<Integer, Set<String>> dsVsPort = new HashMap<>();
    dsVsPort.put(1, site11LocatorsPort);
    dsVsPort.put(2, site22LocatorsPort);
    dsVsPort.put(3, site33LocatorsPort);
    dsVsPort.put(4, site44LocatorsPort);

    int asyncInvocationArrSize = 9;
    AsyncInvocation<?>[] async = new AsyncInvocation[asyncInvocationArrSize];

    async[0] = vm0.invokeAsync(
        () -> WANTestBase.createLocator(1, ports[0], site1LocatorsPort, site2LocatorsPort));

    async[1] = vm1.invokeAsync(
        () -> WANTestBase.createLocator(2, ports[1], site2LocatorsPort, site3LocatorsPort));

    async[2] = vm2.invokeAsync(
        () -> WANTestBase.createLocator(3, ports[2], site3LocatorsPort, site4LocatorsPort));

    async[3] = vm3.invokeAsync(
        () -> WANTestBase.createLocator(4, ports[3], site4LocatorsPort, site1LocatorsPort));

    // pause(5000);
    try {
      async[0].join();
      async[1].join();
      async[2].join();
      async[3].join();
    } catch (InterruptedException e) {
      e.printStackTrace();
      fail("Could not join async operations");
    }

    vm0.invoke(() -> WANTestBase.checkAllSiteMetaDataFor3Sites(dsVsPort));
    vm1.invoke(() -> WANTestBase.checkAllSiteMetaDataFor3Sites(dsVsPort));
    vm2.invoke(() -> WANTestBase.checkAllSiteMetaDataFor3Sites(dsVsPort));
    vm3.invoke(() -> WANTestBase.checkAllSiteMetaDataFor3Sites(dsVsPort));
  }
Test to validate that TK site's locator is recognized by LN and NY. Test to validate that HK
site's locator is recognized by LN , NY, TK.
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/misc/WanAutoDiscoveryDUnitTest.java