private void verifyCannotMoveBucketToExistingHost(InternalDistributedMember member1) {
    PartitionedRegion partitionedRegion = (PartitionedRegion) getCache().getRegion(regionName);
    Set<InternalDistributedMember> bucketOwners =
        partitionedRegion.getRegionAdvisor().getBucketOwners(0);

    assertThat(bucketOwners).hasSize(2);

    PartitionedRegionDataStore dataStore = partitionedRegion.getDataStore();

    assertThat(dataStore.isManagingBucket(0)).isTrue();
    // try to move the bucket from the other member to this one. This should
    // fail because we already have the bucket
    assertThat(dataStore.moveBucket(0, member1, true)).isFalse();
    assertThat(partitionedRegion.getRegionAdvisor().getBucketOwners(0)).isEqualTo(bucketOwners);
  }
A test to make sure that we cannot move a bucket to a member which already hosts the bucket,
thereby reducing our redundancy.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/partitioned/BucketCreationCrashCompletesRegressionTest.java