@Test
  public void testInProgressReplicaAssertion() {
    prioritizationManager.start();

    // Create and add replicas
    int partitionId1 = 1;
    int partitionId2 = 2;
    PartitionId partition1 = new MockPartitionId(partitionId1, MockClusterMap.DEFAULT_PARTITION_CLASS,
        clusterMap.getDataNodes(), 0);
    PartitionId partition2 = new MockPartitionId(partitionId2, MockClusterMap.DEFAULT_PARTITION_CLASS,
        clusterMap.getDataNodes(), 0);

    assertTrue(prioritizationManager.addReplica(partition1.getReplicaIds().get(0)));
    assertTrue(prioritizationManager.addReplica(partition2.getReplicaIds().get(0)));

    // Move replicas to in-progress
    List<ReplicaId> inProgressReplicas = prioritizationManager.getPartitionListForDisk(
        partition1.getReplicaIds().get(0).getDiskId(), 2);

    // Assert in-progress replicas
    List<ReplicaId> retrievedInProgressReplicas = prioritizationManager.getInProgressReplicaIdsForDisk(
        partition1.getReplicaIds().get(0).getDiskId());

    assertEquals("In-progress replicas count should match", 2, retrievedInProgressReplicas.size());
    assertTrue("In-progress replicas should contain partition1",
        retrievedInProgressReplicas.contains(partition1.getReplicaIds().get(0)));
    assertTrue("In-progress replicas should contain partition2",
        retrievedInProgressReplicas.contains(partition2.getReplicaIds().get(0)));

    // Remove in-progress replicas and verify
    assertTrue(prioritizationManager.removeInProgressReplica(partition1.getReplicaIds().get(0).getDiskId(),
        partition1.getReplicaIds().get(0)));
    assertTrue(prioritizationManager.removeInProgressReplica(partition2.getReplicaIds().get(0).getDiskId(),
        partition2.getReplicaIds().get(0)));

    List<ReplicaId> remainingInProgressReplicas = prioritizationManager.getInProgressReplicaIdsForDisk(
        partition1.getReplicaIds().get(0).getDiskId());
    assertTrue("No in-progress replicas should remain", remainingInProgressReplicas.isEmpty());
  }
Adding replicas to the prioritization manager before starting it should fail.
ambry-prioritization/src/test/java/com/github/ambry/replica/prioritization/FSFCPrioritizationManagerTest.java