public static void validateRegionSize(String regionName, final int regionSize) {
    IgnoredException exp =
        IgnoredException.addIgnoredException(ForceReattemptException.class.getName());
    IgnoredException exp1 =
        IgnoredException.addIgnoredException(CacheClosedException.class.getName());
    try {

      final Region r = cache.getRegion(SEPARATOR + regionName);
      assertNotNull(r);
      WaitCriterion wc = new WaitCriterion() {
        @Override
        public boolean done() {
          return r.keySet().size() == regionSize;
        }

        @Override
        public String description() {
          return "Expected region entries: " + regionSize + " but actual entries: "
              + r.keySet().size() + " present region keyset " + r.keySet();
        }
      };
      GeodeAwaitility.await().untilAsserted(wc);
    } finally {
      exp.remove();
      exp1.remove();
    }
  }
To be used for CacheLoader related tests
geode-dunit/src/main/java/org/apache/geode/internal/cache/wan/AsyncEventQueueTestBase.java