### Question:
BlobStore implements Store { @Override public boolean isKeyDeleted(StoreKey key) throws StoreException { checkStarted(); final Timer.Context context = metrics.isKeyDeletedResponse.time(); try { IndexValue value = index.findKey(key); if (value == null) { throw new StoreException("Key " + key + " not found in store. Cannot check if it is deleted", StoreErrorCodes.ID_Not_Found); } return value.isDelete(); } finally { context.stop(); } } BlobStore(ReplicaId replicaId, StoreConfig config, ScheduledExecutorService taskScheduler,
      ScheduledExecutorService longLivedTaskScheduler, DiskIOScheduler diskIOScheduler,
      DiskSpaceAllocator diskSpaceAllocator, StoreMetrics metrics, StoreMetrics storeUnderCompactionMetrics,
      StoreKeyFactory factory, MessageStoreRecovery recovery, MessageStoreHardDelete hardDelete,
      List<ReplicaStatusDelegate> replicaStatusDelegates, Time time, AccountService accountService);   BlobStore(String storeId, StoreConfig config, ScheduledExecutorService taskScheduler,
      ScheduledExecutorService longLivedTaskScheduler, DiskIOScheduler diskIOScheduler,
      DiskSpaceAllocator diskSpaceAllocator, StoreMetrics metrics, StoreMetrics storeUnderCompactionMetrics,
      String dataDir, long capacityInBytes, StoreKeyFactory factory, MessageStoreRecovery recovery,
      MessageStoreHardDelete hardDelete, Time time);   BlobStore(ReplicaId replicaId, String storeId, StoreConfig config, ScheduledExecutorService taskScheduler,
      ScheduledExecutorService longLivedTaskScheduler, DiskIOScheduler diskIOScheduler,
      DiskSpaceAllocator diskSpaceAllocator, StoreMetrics metrics, StoreMetrics storeUnderCompactionMetrics,
      String dataDir, long capacityInBytes, StoreKeyFactory factory, MessageStoreRecovery recovery,
      MessageStoreHardDelete hardDelete, List<ReplicaStatusDelegate> replicaStatusDelegates, Time time,
      AccountService accountService, BlobStoreStats blobStoreStats); @Override void start(); @Override StoreInfo get(List<? extends StoreKey> ids, EnumSet<StoreGetOptions> storeGetOptions); @Override void put(MessageWriteSet messageSetToWrite); @Override void delete(List<MessageInfo> infosToDelete); @Override void updateTtl(List<MessageInfo> infosToUpdate); @Override short undelete(MessageInfo info); @Override FindInfo findEntriesSince(FindToken token, long maxTotalSizeOfEntries); @Override Set<StoreKey> findMissingKeys(List<StoreKey> keys); @Override MessageInfo findKey(StoreKey key); @Override StoreStats getStoreStats(); @Override boolean isKeyDeleted(StoreKey key); @Override long getSizeInBytes(); long getLogEndOffsetInBytes(); @Override boolean isEmpty(); @Override boolean isBootstrapInProgress(); @Override boolean isDecommissionInProgress(); @Override void completeBootstrap(); @Override void setCurrentState(ReplicaState state); @Override ReplicaState getCurrentState(); @Override boolean recoverFromDecommission(); @Override boolean disabledOnError(); void deleteStoreFiles(); @Override long getEndPositionOfLastPut(); List<ReplicaStatusDelegate> getReplicaStatusDelegates(); @Override void shutdown(); @Override boolean isStarted(); @Override String toString();  }### Answer:
@Test public void isKeyDeletedTest() throws StoreException { for (MockId id : allKeys.keySet()) { assertEquals("Returned state is not as expected", deletedKeys.contains(id), store.isKeyDeleted(id)); } for (MockId id : deletedAndShouldBeCompactedKeys) { assertTrue("Returned state is not as expected", store.isKeyDeleted(id)); } try { store.isKeyDeleted(getUniqueId()); fail("Getting the deleted state of a non existent key should have failed"); } catch (StoreException e) { assertEquals("Unexpected StoreErrorCode", StoreErrorCodes.ID_Not_Found, e.getErrorCode()); } }