private Object validateBucketsOnNode(int whichRegion) {
    int containsNode = 0;
    Cache cache = getCache();
    PartitionedRegion partitionedRegion =
        (PartitionedRegion) cache.getRegion(prNamePrefix + whichRegion);
    RegionAdvisor regionAdvisor = partitionedRegion.getRegionAdvisor();

    try {
      for (int bucketId : regionAdvisor.getBucketSet()) {
        Set<InternalDistributedMember> nodeList = regionAdvisor.getBucketOwners(bucketId);
        if (nodeList != null && nodeList.contains(partitionedRegion.getMyId())) {
          containsNode++;
        }
      }
    } catch (NoSuchElementException ignored) {
    }

    return containsNode;
  }
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