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

    final ServerLocation sl1 = new ServerLocation("localhost", 1);
    final ServerLocation sl2 = new ServerLocation("localhost", 2);
    final String uniqueId1 = new InternalDistributedMember("localhost", 1).getUniqueId();
    final String uniqueId2 = new InternalDistributedMember("localhost", 2).getUniqueId();
    final ServerLocationAndMemberId sli1 = new ServerLocationAndMemberId(sl1, uniqueId1);
    final ServerLocationAndMemberId sli2 = new ServerLocationAndMemberId(sl2, uniqueId2);
    LocatorLoadSnapshot.LoadHolder loadHolder1 =
        new LocatorLoadSnapshot.LoadHolder(sl1, 50, 1, LOAD_POLL_INTERVAL);
    LocatorLoadSnapshot.LoadHolder loadHolder2 =
        new LocatorLoadSnapshot.LoadHolder(sl2, 50, 1, LOAD_POLL_INTERVAL);

    Map<ServerLocationAndMemberId, LocatorLoadSnapshot.LoadHolder> groupServers = new HashMap<>();
    groupServers.put(sli1, loadHolder1);
    groupServers.put(sli2, loadHolder2);
    Map<String, Map<ServerLocationAndMemberId, LocatorLoadSnapshot.LoadHolder>> map =
        new HashMap<>();
    map.put(null, groupServers);

    loadSnapshot.removeFromMap(map, new String[] {""}, sl1, uniqueId1);

    assertThat(groupServers).hasSize(1);
    assertThat(groupServers).doesNotContainKey(sli1);
  }
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