@Test
  public void testStressTest_MultiplePartitions() throws InterruptedException {
    // Arrange
    final BootstrapController.BootstrapControllerImpl bootstrapControllerImpl =
        getBootstrapControllerImpl(ServerReplicationMode.BLOB_BASED);

    int partitionCount = 300;
    String[] partitionNames = new String[partitionCount];

    for (int i = 0; i < partitionCount; i++) {
      partitionNames[i] = "partition" + i;
      when(storeManager.getReplica(partitionNames[i])).thenReturn(null);
    }

    // Act
    // Run bootstrap transitions for all partitions concurrently
    Thread[] threads = new Thread[partitionCount];
    for (int i = 0; i < partitionCount; i++) {
      final int index = i;
      threads[i] = new Thread(() -> {
        bootstrapControllerImpl
            .onPartitionBecomeBootstrapFromOffline(partitionNames[index]);
      });
      threads[i].start();
    }

    // Wait for all threads to finish
    for (Thread thread : threads) {
      thread.join();
    }

    // Assert
    // Verify each partition was processed
    for (String partitionName : partitionNames) {
      verify(storageManagerListener, times(1)).onPartitionBecomeBootstrapFromOffline(partitionName);
    }
  }
Test for {@link BootstrapController.BootstrapControllerImpl#onPartitionBecomeBootstrapFromOffline(String)}
when :-
1. The server replication mode is {@link ServerReplicationMode#FILE_BASED}
2. Replica is not null
3. Bootstrap_in_progress file doesn't exist
4. Filecopy_in_progress file doesn't exist
5. Atleast one LogSegment File exists for the partition
Bootstrap Controller is expected to instantiate storageManagerListener
ReplicationProtocolTransitionType is either of the following types :-
a. {@link ReplicationProtocolTransitionType#BLOB_BASED_HYDRATION_COMPLETE_TO_FILE_BASED_HYDRATION} state
b. {@link ReplicationProtocolTransitionType#FILE_BASED_HYDRATION_COMPLETE_TO_FILE_BASED_HYDRATION} state
ambry-store/src/test/java/com/github/ambry/store/BootstrapControllerTest.java