@Test
  public void test_borrow_connection_toward_specific_server_no_freeConnection_wait_returnConnection_toward_this_server() {
    long idleTimeoutMillis = 800;
    manager =
        new ConnectionManagerImpl("pool", factory, endpointManager, 5, 1, idleTimeoutMillis, -1,
            logger, 60 * 1000, cancelCriterion, poolStats);
    manager.start(background);

    await().untilAsserted(() -> assertThat(manager.getConnectionCount()).isOne());

    long borrowTimeoutMillis = 500;

    // seize connection toward any server
    manager.borrowConnection(borrowTimeoutMillis);
    manager.borrowConnection(borrowTimeoutMillis);

    // Seize connection toward this specific server
    Connection ping1 =
        manager.borrowConnection(new ServerLocation("localhost", 5), borrowTimeoutMillis, false);
    Connection ping2 =
        manager.borrowConnection(new ServerLocation("localhost", 5), borrowTimeoutMillis, false);
    manager.borrowConnection(new ServerLocation("localhost", 5), borrowTimeoutMillis, false);

    // Return some connections, let them idle expire
    manager.returnConnection(ping1);
    manager.returnConnection(ping2);

    assertThatCode(() -> {
      manager.borrowConnection(new ServerLocation("localhost", 5), borrowTimeoutMillis, true);
    }).doesNotThrowAnyException();
  }
Test borrow connection toward specific server (use). Max connection is 5, and there is no free
connections in pool.
We are waiting for returnConnection for connection toward this specific server.
After it is returned, we will reuse it.
geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/pooling/ConnectionManagerJUnitTest.java