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

    final ServerLocation sl1 = new ServerLocation("localhost", 1);
    final ServerLocation sl2 = new ServerLocation("localhost", 2);
    final ServerLocation sl3 = new ServerLocation("localhost", 3);

    LocatorLoadSnapshot.LoadHolder loadHolder1 =
        new LocatorLoadSnapshot.LoadHolder(sl1, 50, 1, LOAD_POLL_INTERVAL);
    LocatorLoadSnapshot.LoadHolder loadHolder2 =
        new LocatorLoadSnapshot.LoadHolder(sl2, 50, 1, LOAD_POLL_INTERVAL);
    LocatorLoadSnapshot.LoadHolder loadHolder3 =
        new LocatorLoadSnapshot.LoadHolder(sl3, 50, 1, LOAD_POLL_INTERVAL);

    Map<ServerLocation, LocatorLoadSnapshot.LoadHolder> groupServers = new HashMap<>();
    groupServers.put(sl1, loadHolder1);
    groupServers.put(sl2, loadHolder2);
    groupServers.put(sl3, loadHolder3);

    Map<ServerLocation, LocatorLoadSnapshot.LoadHolder> groupAServers = new HashMap<>();
    groupAServers.put(sl1, loadHolder1);
    groupAServers.put(sl2, loadHolder2);

    Map<String, Map<ServerLocation, LocatorLoadSnapshot.LoadHolder>> map =
        new HashMap<>();
    map.put(null, groupServers);
    map.put("a", groupAServers);

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

    assertThat(groupServers).hasSize(2);
    assertThat(groupServers).doesNotContainKey(sl1);

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