@Test
  public void testBalancing() throws Exception {
    final Host host = Host.getHost(0);
    VM vm0 = host.getVM(0);
    VM vm1 = host.getVM(1);
    VM vm2 = host.getVM(2);
    VM vm3 = host.getVM(3);

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

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

    vm3.invoke("StartBridgeClient", () -> {
      PoolFactoryImpl pf = new PoolFactoryImpl(null);
      pf.addLocator(hostName, locatorPort);
      pf.setMinConnections(80);
      pf.setMaxConnections(80);
      pf.setSubscriptionEnabled(false);
      pf.setIdleTimeout(-1);
      startBridgeClient(pf.getPoolAttributes(), new String[] {REGION_NAME});
      return null;
    });

    vm3.invoke("waitForPrefilledConnections", () -> waitForPrefilledConnections(80));

    vm1.invoke("check connection count", () -> checkConnectionCount(40));
    vm2.invoke("check connection count", () -> checkConnectionCount(40));
  }
Test to make sure that the locator balancing load between two servers.
geode-core/src/distributedTest/java/org/apache/geode/cache/client/internal/LocatorLoadBalancingDUnitTest.java