@Test
  public void testFindBestServersCalledWithZeroCount() {
    final LocatorLoadSnapshot loadSnapshot = new LocatorLoadSnapshot();

    final ServerLocation l1 = new ServerLocation("localhost", 1);
    final ServerLocation l2 = new ServerLocation("localhost", 2);
    final ServerLocation l3 = new ServerLocation("localhost", 3);
    final String uniqueId1 = new InternalDistributedMember("localhost", 1).getUniqueId();
    final String uniqueId2 = new InternalDistributedMember("localhost", 2).getUniqueId();
    final String uniqueId3 = new InternalDistributedMember("localhost", 3).getUniqueId();

    final ServerLocationAndMemberId sli1 = new ServerLocationAndMemberId(l1, uniqueId1);
    final ServerLocationAndMemberId sli2 = new ServerLocationAndMemberId(l2, uniqueId2);
    final ServerLocationAndMemberId sli3 = new ServerLocationAndMemberId(l3, uniqueId3);

    float l1ConnectionLoad = 50;
    float l2ConnectionLoad = 30;
    float l3ConnectionLoad = 40;

    LocatorLoadSnapshot.LoadHolder loadHolder1 =
        new LocatorLoadSnapshot.LoadHolder(l1, l1ConnectionLoad, 1, LOAD_POLL_INTERVAL);
    LocatorLoadSnapshot.LoadHolder loadHolder2 =
        new LocatorLoadSnapshot.LoadHolder(l2, l2ConnectionLoad, 1, LOAD_POLL_INTERVAL);
    LocatorLoadSnapshot.LoadHolder loadHolder3 =
        new LocatorLoadSnapshot.LoadHolder(l3, l3ConnectionLoad, 1, LOAD_POLL_INTERVAL);

    Map<ServerLocationAndMemberId, LocatorLoadSnapshot.LoadHolder> groupServers = new HashMap<>();

    groupServers.put(sli1, loadHolder1);
    groupServers.put(sli2, loadHolder2);
    groupServers.put(sli3, loadHolder3);

    List<LocatorLoadSnapshot.LoadHolder> result =
        loadSnapshot.findBestServers(groupServers, Collections.emptySet(), 0);
    assertThat(result).hasSize(0);
  }
Test that we can specify a list of servers to exclude and the snapshot honors the request when
picking the best server.
geode-core/src/test/java/org/apache/geode/distributed/internal/LocatorLoadSnapshotTest.java