@Test
  public void replicaFromOfflineToDroppedTest() throws Exception {
    generateConfigs(true, false);
    MockDataNodeId localNode = clusterMap.getDataNodes().get(0);
    List<ReplicaId> localReplicas = clusterMap.getReplicaIds(localNode);
    ReplicaId testReplica = localReplicas.get(0);
    MockClusterParticipant mockHelixParticipant = Mockito.spy(new MockClusterParticipant());
    doNothing().when(mockHelixParticipant).setPartitionDisabledState(anyString(), anyBoolean());
    StorageManager storageManager =
        createStorageManager(localNode, metricRegistry, Collections.singletonList(mockHelixParticipant));
    storageManager.start();
    storageManager.controlCompactionForBlobStore(testReplica.getPartitionId(), false);
    CountDownLatch participantLatch = new CountDownLatch(1);
    Utils.newThread(() -> {
      mockHelixParticipant.onPartitionBecomeDroppedFromOffline(testReplica.getPartitionId().toPathString());
      participantLatch.countDown();
    }, false).start();
    assertTrue("Helix participant transition didn't get invoked within 1 sec",
        participantLatch.await(1, TimeUnit.SECONDS));
    shutdownAndAssertStoresInaccessible(storageManager, localReplicas);
  }
Test Offline-To-Dropped transition.
@throws Exception
ambry-store/src/test/java/com/github/ambry/store/StorageManagerTest.java