@Test
  public void testDiscovery() {
    Host host = Host.getHost(0);
    VM vm0 = host.getVM(0);
    VM vm1 = host.getVM(1);
    VM vm2 = host.getVM(2);

    String hostName = NetworkUtils.getServerHostName();
    int locatorPort = vm0.invoke("Start Locator", () -> startLocator(hostName, ""));

    String locators = getLocatorString(hostName, locatorPort);

    int serverPort = vm1.invoke("Start BridgeServer",
        () -> startBridgeServer(new String[] {"a", "b"}, locators));

    ServerLoad expectedLoad = new ServerLoad(0f, 1 / 800.0f, 0f, 1f);
    ServerLocation expectedLocation = new ServerLocation(hostName, serverPort);
    Map expected = new HashMap();
    expected.put(expectedLocation, expectedLoad);

    vm0.invoke("check Locator Load", () -> checkLocatorLoad(expected));

    int serverPort2 = vm2.invoke("Start BridgeServer",
        () -> startBridgeServer(new String[] {"a", "b"}, locators));

    ServerLocation expectedLocation2 = new ServerLocation(hostName, serverPort2);

    expected.put(expectedLocation2, expectedLoad);
    vm0.invoke("check Locator Load", () -> checkLocatorLoad(expected));
  }
Test the locator discovers a cache server and is initialized with the correct load for that
cache server.
geode-core/src/distributedTest/java/org/apache/geode/cache/client/internal/LocatorLoadBalancingDUnitTest.java