@Test
  public void testRedundancySatisfaction() throws UnknownHostException {
    PartitionedRegionLoadModel model = new PartitionedRegionLoadModel(bucketOperator, 2, 4,
        getAddressComparor(false), Collections.emptySet(), partitionedRegion);
    InternalDistributedMember member1 =
        new InternalDistributedMember(InetAddress.getByName("127.0.0.1"), 1);
    InternalDistributedMember member2 =
        new InternalDistributedMember(InetAddress.getByName("127.0.0.1"), 2);
    PartitionMemberInfoImpl details1 =
        buildDetails(member1, new long[] {1, 1, 1, 0}, new long[] {1, 1, 1, 0});
    PartitionMemberInfoImpl details2 =
        buildDetails(member2, new long[] {0, 1, 0, 1}, new long[] {0, 0, 0, 1});
    model.addRegion("a", Arrays.asList(details1, details2), new FakeOfflineDetails(), true);

    Set<PartitionMemberInfo> details = model.getPartitionedMemberDetails("a");
    assertThat(details).hasSize(2);

    PartitionMemberInfo[] memberInfo = details.toArray(new PartitionMemberInfo[0]);

    assertThat(memberInfo[0].getBucketCount()).isEqualTo(3);
    assertThat(memberInfo[0].getConfiguredMaxMemory()).isEqualTo(500);
    assertThat(memberInfo[0].getPrimaryCount()).isEqualTo(3);

    // we expect three moves
    assertThat(doMoves(new CompositeDirector(true, true, false, false), model)).isEqualTo(3);

    PartitionMemberInfo[] memberInfo2 =
        model.getPartitionedMemberDetails("a").toArray(new PartitionMemberInfo[0]);

    assertThat(memberInfo2[0].getBucketCount()).isEqualTo(4);
    assertThat(memberInfo2[0].getConfiguredMaxMemory()).isEqualTo(500);
    assertThat(memberInfo2[0].getPrimaryCount()).isEqualTo(3);

    List<Create> expectedCreates = new ArrayList<>();
    expectedCreates.add(new Create(member2, 0));
    expectedCreates.add(new Create(member2, 2));
    expectedCreates.add(new Create(member1, 3));
    assertThat(bucketOperator.creates).isEqualTo(expectedCreates);
  }
This test checks basic redundancy satisfaction. It creates two buckets with low redundancy and
1 bucket with full redundancy and excepts copies of the low redundancy buckets to be made.
geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/rebalance/PartitionedRegionLoadModelJUnitTest.java