private void createPRsAndAwaitRecovery(int localMaxMemory, int redundancy, int totalNumBuckets)
      throws InterruptedException {
    CountDownLatch recoveryDone = new CountDownLatch(numberOfRegions);

    ResourceObserver waitForRecovery = new ResourceObserverAdapter() {
      @Override
      public void rebalancingOrRecoveryFinished(Region region) {
        recoveryDone.countDown();
      }
    };

    InternalResourceManager.setResourceObserver(waitForRecovery);
    String originalValue = setSystemProperty(RETRY_TIMEOUT_PROPERTY, RETRY_TIMEOUT_VALUE);
    try {
      Cache cache = getCache();
      for (int i = 0; i < numberOfRegions; i++) {
        String regionName = prNamePrefix + i;
        createPartitionedRegion(cache, regionName, localMaxMemory, redundancy, totalNumBuckets);
      }
      assertThat(recoveryDone.await(1, MINUTES)).isTrue();
    } finally {
      InternalResourceManager.setResourceObserver(null);
      setSystemProperty(RETRY_TIMEOUT_PROPERTY, originalValue);
    }
  }
This verifies the Bucket Regions on the basis of redundantCopies set in RegionAttributes.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionHADUnitTest.java