private void assertThatBucketHasRedundantCopies(PartitionedRegion pr, int bucketId) {
    boolean forceReattempt;
    do {
      forceReattempt = false;
      try {
        List owners = pr.getBucketOwnersForValidation(bucketId);
        assertThat(owners).hasSize(pr.getRedundantCopies() + 1);
      } catch (ForceReattemptException ignored) {
        forceReattempt = true;
      }
    } while (forceReattempt);
  }
Test for peer recovery of buckets when a member is removed from the distributed system
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionHAFailureAndRecoveryDUnitTest.java