@Test
  public void multiParticipantsMarkStoreInErrorStateTest() throws Exception {
    MockDataNodeId dataNode = clusterMap.getDataNodes().get(0);
    List<ReplicaId> replicas = clusterMap.getReplicaIds(dataNode);
    List<ClusterParticipant> participants = Arrays.asList(new MockClusterParticipant(), new MockClusterParticipant());
    StorageManager storageManager = createStorageManager(dataNode, metricRegistry, participants);
    storageManager.start();
    // stop one of the stores to induce transition failure
    PartitionId id = replicas.get(0).getPartitionId();
    storageManager.shutdownBlobStore(id);
    // verify that both participants throw exception during OFFLINE -> BOOTSTRAP transition
    for (ClusterParticipant participant : participants) {
      try {
        ((MockClusterParticipant) participant).onPartitionBecomeBootstrapFromOffline(id.toPathString());
        fail("should fail because store is not started");
      } catch (StateTransitionException e) {
        assertEquals("Error code doesn't match", StoreNotStarted, e.getErrorCode());
      }
    }
    shutdownAndAssertStoresInaccessible(storageManager, replicas);
  }
Test that, if store is not started, all participants on this node are able to mark it in ERROR state during
OFFLINE -> BOOTSTRAP transition.
@throws Exception
ambry-store/src/test/java/com/github/ambry/store/StorageManagerTest.java