@Test
  public void testStoreNotStarted() throws Exception {
    v1TestOnly();
    // Create store and don't start it.
    setupCloudStore(false, true, defaultCacheLimit, false);
    List<StoreKey> keys = Collections.singletonList(getUniqueId(refAccountId, refContainerId, false, partitionId));
    MockMessageWriteSet messageWriteSet = new MockMessageWriteSet();
    CloudTestUtil.addBlobToMessageSet(messageWriteSet, 10, Utils.Infinite_Time, refAccountId, refContainerId, true,
        false, partitionId, operationTime, isVcr);
    try {
      store.put(messageWriteSet);
      fail("Store put should have failed.");
    } catch (StoreException e) {
      assertEquals(StoreErrorCodes.StoreNotStarted, e.getErrorCode());
    }
    try {
      store.delete(messageWriteSet.getMessageSetInfo());
      fail("Store delete should have failed.");
    } catch (StoreException e) {
      assertEquals(StoreErrorCodes.StoreNotStarted, e.getErrorCode());
    }
    try {
      store.findMissingKeys(keys);
      fail("Store findMissingKeys should have failed.");
    } catch (StoreException e) {
      assertEquals(StoreErrorCodes.StoreNotStarted, e.getErrorCode());
    }
  }
Test verifying behavior when store not started.
ambry-vcr/src/test/java/com/github/ambry/vcr/CloudBlobStoreTest.java