@Test
  public void testFileBasedHydrationInCompleteToBlobBasedHydration() throws IOException, StoreException {
    // Arrange
    clearInvocations(fileCopyManagerListener);
    clearInvocations(storageManagerListener);

    BootstrapController.BootstrapControllerImpl bootstrapControllerImpl =
        getBootstrapControllerImpl(ServerReplicationMode.BLOB_BASED);

    TestReplica testReplica = mock(TestReplica.class);
    PartitionId partitionId = mock(PartitionId.class);
    when(testReplica.getPartitionId())
        .thenReturn(partitionId);
    when(storeManager.getReplica(partitionName1))
        .thenReturn(testReplica);

    when(bootstrapControllerImpl.isFileExists(partitionId, storeConfig.storeFileCopyInProgressFileName))
        .thenReturn(true);
    when(storeManager.isFileExists(partitionId, storeConfig.storeBootstrapInProgressFile))
        .thenReturn(false);

    when(bootstrapControllerImpl.isAnyLogSegmentExists(partitionId))
        .thenReturn(true);

    // Act
    bootstrapControllerImpl.onPartitionBecomeBootstrapFromOffline(partitionName1);

    // Assert
    // TODO: Fix the assertions

    //    verify(fileCopyManagerListener, never())
    //        .onPartitionBecomeBootstrapFromOffline(partitionName1);
    //    verify(storageManagerListener, times(1))
    //        .onPartitionBecomeBootstrapFromOffline(partitionName1);
    //
    //    assert bootstrapControllerImpl.replicationProtocolTransitionType.size() == 1;
    //    assert bootstrapControllerImpl.replicationProtocolTransitionType.contains(
    //        ReplicationProtocolTransitionType.FILE_BASED_HYDRATION_INCOMPLETE_TO_BLOB_BASED_HYDRATION);
  }
Test for {@link BootstrapController.BootstrapControllerImpl#onPartitionBecomeBootstrapFromOffline(String)}
when :-
1. The server replication mode is {@link ServerReplicationMode#BLOB_BASED}
2. Replica is not null
3. Bootstrap_in_progress file doesn't exist
4. Filecopy_in_progress file exists
5. Atleast one LogSegment File exists for the partition
Bootstrap Controller is expected to instantiate storageManagerListener
ReplicationProtocolTransitionType is {@link ReplicationProtocolTransitionType#FILE_BASED_HYDRATION_INCOMPLETE_TO_BLOB_BASED_HYDRATION}
ambry-store/src/test/java/com/github/ambry/store/BootstrapControllerTest.java