@Test
  public void testResolveReplicaSealStatus() {
    assumeFalse(useComposite);
    int firstPartitionId = numOfReadOnly + numOfReadWrite + numOfPartialReadWrite;
    Set<String> sealedList = new HashSet<>();
    Set<String> partiallySealedList = new HashSet<>();
    HelixClusterChangeHandler helixClusterChangeHandler =
        ((HelixClusterManager) clusterManager).getHelixClusterChangeHandler(localDc);

    String partitionName1 = Integer.toString(firstPartitionId);
    assertEquals(ReplicaSealStatus.NOT_SEALED,
        helixClusterChangeHandler.resolveReplicaSealStatus(partitionName1, sealedList, partiallySealedList));
    sealedList.add(partitionName1);
    assertEquals(ReplicaSealStatus.SEALED,
        helixClusterChangeHandler.resolveReplicaSealStatus(partitionName1, sealedList, partiallySealedList));
    partiallySealedList.add(partitionName1);
    assertEquals(ReplicaSealStatus.SEALED,
        helixClusterChangeHandler.resolveReplicaSealStatus(partitionName1, sealedList, partiallySealedList));
    String partitionName2 = Integer.toString(firstPartitionId + 1);
    partiallySealedList.add(partitionName2);
    assertEquals(ReplicaSealStatus.PARTIALLY_SEALED,
        helixClusterChangeHandler.resolveReplicaSealStatus(partitionName2, sealedList, partiallySealedList));
    String partitionName3 = Integer.toString(firstPartitionId + 4);
    assertEquals(ReplicaSealStatus.NOT_SEALED,
        helixClusterChangeHandler.resolveReplicaSealStatus(partitionName3, sealedList, partiallySealedList));

    if (overrideEnabled) {
      assertEquals(ReplicaSealStatus.SEALED,
          helixClusterChangeHandler.resolveReplicaSealStatus(partitionName1, sealedList, partiallySealedList));
      assertEquals(ReplicaSealStatus.PARTIALLY_SEALED,
          helixClusterChangeHandler.resolveReplicaSealStatus(partitionName2, sealedList, partiallySealedList));
      firstPartitionId = numOfReadOnly + numOfReadWrite;
      assertEquals(ReplicaSealStatus.PARTIALLY_SEALED,
          helixClusterChangeHandler.resolveReplicaSealStatus(Integer.toString(firstPartitionId), sealedList,
              partiallySealedList));
      assertEquals(ReplicaSealStatus.NOT_SEALED,
          helixClusterChangeHandler.resolveReplicaSealStatus(partitionName3, sealedList, partiallySealedList));
    }
  }
Test {@link HelixClusterChangeHandler#resolveReplicaSealStatus(String, Collection, Collection)}.
ambry-clustermap/src/test/java/com/github/ambry/clustermap/HelixClusterManagerTest.java