@Test
  void getLocatorAddressesReturnsLocatorsInSortedOrder() {
    final List<HostAndPort> locators = asList(
        new HostAndPort("locator2", 1234),
        new HostAndPort("locator1", 1234));

    final LocatorList locatorList = new LocatorList(locators);

    assertThat(locatorList.getLocatorAddresses()).containsExactly(
        new HostAndPort("locator1", 1234),
        new HostAndPort("locator2", 1234));
  }
The explicit order of these isn't important, only that it be consistent.
geode-core/src/test/java/org/apache/geode/cache/client/internal/LocatorListTest.java