@Test
  public void threeRedundancyZonesWithNoRedundancyAndEnforceUniqueZones()
      throws UnknownHostException {

    InternalDistributedMember member1 =
        new InternalDistributedMember(InetAddress.getByName("127.0.0.1"), 1);
    InternalDistributedMember member2 =
        new InternalDistributedMember(InetAddress.getByName("127.0.0.1"), 2);
    InternalDistributedMember member3 =
        new InternalDistributedMember(InetAddress.getByName("127.0.0.1"), 3);

    // Create some imbalanced nodes
    PartitionMemberInfoImpl details1 =
        buildDetails(member1, new long[] {1, 0, 1}, new long[] {1, 0, 1});
    PartitionMemberInfoImpl details2 =
        buildDetails(member2, new long[] {1, 1, 0}, new long[] {0, 1, 0});
    PartitionMemberInfoImpl details3 =
        buildDetails(member3, new long[] {0, 0, 0}, new long[] {0, 0, 0});

    when(clusterDistributionManager.getRedundancyZone(member1)).thenReturn("zoneA");
    when(clusterDistributionManager.getRedundancyZone(member2)).thenReturn("zoneB");
    when(clusterDistributionManager.getRedundancyZone(member3)).thenReturn("zoneC");
    when(clusterDistributionManager.enforceUniqueZone()).thenReturn(true);
    when(clusterDistributionManager.areInSameZone(ArgumentMatchers.any(), ArgumentMatchers.any()))
        .thenReturn(false);

    PartitionedRegionLoadModel model = new PartitionedRegionLoadModel(bucketOperator, 0, 3,
        new ZoneComparer(), Collections.emptySet(), partitionedRegion);
    model.addRegion("a", Arrays.asList(details1, details2, details3), new FakeOfflineDetails(),
        true);

    assertThat(doMoves(new CompositeDirector(true, true, true, true), model)).isEqualTo(2);

    assertThat(bucketOperator.primaryMoves).isEqualTo(Collections.emptyList());
    assertThat(bucketOperator.creates).isEqualTo(Collections.emptyList());

    List<Move> expectedMove = new ArrayList<>();
    expectedMove.add(new Move(member1, member3));
    assertThat(bucketOperator.bucketMoves).isEqualTo(expectedMove);

    List<Remove> expectedRemoves = new ArrayList<>();
    expectedRemoves.add(new Remove(member2, 0));
    assertThat(bucketOperator.removes).isEqualTo(expectedRemoves);

  }
When EnforceUniqueZones is enabled and there are three servers in separate zones, if the load
is not balanced properly because a new server has come online, verify the rebalance works
properly.
geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/rebalance/PartitionedRegionLoadModelJUnitTest.java