@Test
  public void testResetOfPrioritizedPartitionMetrics() {
    // Setup partitions
    Set<PartitionId> partitions = new HashSet<>(Arrays.asList(partition1, partition2, partition3));
    when(storageManager.getLocalPartitions()).thenReturn(partitions);

    // All partitions are in BOOTSTRAP state initially
    when(store1.getCurrentState()).thenReturn(ReplicaState.BOOTSTRAP);
    when(store2.getCurrentState()).thenReturn(ReplicaState.BOOTSTRAP);
    when(store3.getCurrentState()).thenReturn(ReplicaState.BOOTSTRAP);

    // Partition1 is below the minimum replica count (high priority)
    when(clusterManagerQueryHelper.getMinActiveReplicas(partition1)).thenReturn(3);
    mockReplicaStates(partition1, 2);

    // Partition2 is at the minimum replica count (medium priority)
    when(clusterManagerQueryHelper.getMinActiveReplicas(partition2)).thenReturn(3);
    mockReplicaStates(partition2, 3);

    // Partition3 is above the minimum replica count (low priority)
    when(clusterManagerQueryHelper.getMinActiveReplicas(partition3)).thenReturn(3);
    mockReplicaStates(partition3, 4);

    // First run - categorize partitions
    manager.startPrioritizationCycle();

    // Verify prioritization categories are populated
    assertNotNull("Prioritization categories should not be null", manager.getReplicationPrioritizationMetrics().getBelowMinReplicaWithDisruptionCount());
    assertTrue("High-priority partitions should be categorized", manager.getCurrentlyReplicatingPriorityPartitions().contains(partition1));

    // Reset mocks for the next run
    reset(replicationEngine);

    // All partitions complete bootstrapping
    when(store1.getCurrentState()).thenReturn(ReplicaState.STANDBY);
    when(store2.getCurrentState()).thenReturn(ReplicaState.STANDBY);
    when(store3.getCurrentState()).thenReturn(ReplicaState.STANDBY);

    // Second run - all partitions should be reset
    manager.startPrioritizationCycle();

    // Verify prioritization categories are reset
    assertTrue("Prioritization categories should be reset", manager.getCurrentlyReplicatingPriorityPartitions().isEmpty());
    assertEquals("All prioritization metrics should be reset to zero", 0, manager.getReplicationPrioritizationMetrics().getBelowMinReplicaWithDisruptionCount().getValue().intValue());
    assertEquals("All prioritization metrics should be reset to zero", 0, manager.getReplicationPrioritizationMetrics().getMinReplicaWithDisruptionCount().getValue().intValue());
    assertEquals("All prioritization metrics should be reset to zero", 0, manager.getReplicationPrioritizationMetrics().getNormalPriorityCount().getValue().intValue());
  }
Test when initially all partitions are in BOOTSTRAP state and some are disabled.
In next run some partitions complete replication and there are no further bootstrapping partitions
Then disabled partitions should be enabled.
ambry-prioritization/src/test/java/com/github/ambry/replica/prioritization/ReplicationPrioritizationManagerTest.java