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

    final ServerLocation serverLocation = new ServerLocation("localhost", 1);
    final String uniqueId = "memberId1";

    loadSnapshot.addServer(serverLocation, uniqueId, new String[0], new ServerLoad(50, 1, 0, 1),
        LOAD_POLL_INTERVAL);

    LocatorLoadSnapshot.LoadHolder expectedLoadHolder =
        new LocatorLoadSnapshot.LoadHolder(serverLocation, 60, 2, LOAD_POLL_INTERVAL);

    loadSnapshot.updateQueueLoadMap(serverLocation, expectedLoadHolder.getLoad(),
        expectedLoadHolder.getLoadPerConnection());

    Map<ServerLocation, ServerLoad> serverLoadMap = loadSnapshot.getLoadMap();
    ServerLoad queueServerLoad = serverLoadMap.get(serverLocation);
    assertThat(expectedLoadHolder.getLoad())
        .isEqualTo(queueServerLoad.getSubscriptionConnectionLoad());
    assertThat(expectedLoadHolder.getLoadPerConnection())
        .isEqualTo(queueServerLoad.getLoadPerSubscriptionConnection());
  }
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