@Test
  void getSizeReturnsCorrectSizes() {
    assertThat(new LocatorList(emptyList()).size()).isEqualTo(0);

    assertThat(new LocatorList(singletonList(
        new HostAndPort("locator2", 1234))).size()).isEqualTo(1);

    assertThat(new LocatorList(asList(
        new HostAndPort("locator2", 1234),
        new HostAndPort("locator1", 1234))).size()).isEqualTo(2);
  }
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