private static <K, V> Region<K, V> waitForSubRegion(final Region<K, V> r,
      final String subRegName) {
    await().alias("Waiting for subregion " + subRegName)
        .until(() -> r.getSubregion(subRegName) != null);
    return r.getSubregion(subRegName);
  }
A handy method to poll for arrival of non-null/non-invalid entries

@param r the Region to poll
@param key the key of the Entry to poll for
geode-core/src/distributedTest/java/org/apache/geode/cache/ConnectionPoolDUnitTest.java