@Test
  void iteratorReturnsExhaustedIteratorWhenEmpty() {
    final Iterator<@NotNull HostAndPort> iterator = new LocatorList(emptyList()).iterator();
    assertThat(iterator).isExhausted();
    assertThatThrownBy(iterator::next).isInstanceOf(NoSuchElementException.class);
  }
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