private static PoolImpl getPool(Region r) {
    PoolImpl result = null;
    String poolName = r.getAttributes().getPoolName();
    if (poolName != null) {
      result = (PoolImpl) PoolManager.find(poolName);
    }
    return result;
  }
The port on which the cache server was started in this VM
geode-core/src/distributedTest/java/org/apache/geode/cache/ConnectionPoolDUnitTest.java