@Test
  public void concurrentDeleteAndPutTest() throws Exception {
    MockId id = getUniqueId();

    ExecutorService executorService = Executors.newFixedThreadPool(2);
    try {
      Future<Void> deleteFuture = executorService.submit(() -> {
        MessageInfo info =
            new MessageInfo(id, DELETE_RECORD_SIZE, id.getAccountId(), id.getContainerId(), time.milliseconds(),
                MessageInfo.LIFE_VERSION_FROM_FRONTEND);
        store.delete(Collections.singletonList(info));
        return null;
      });

      try {
        deleteFuture.get();
        fail("Should fail with ID_NOT_FOUND error");
      } catch (Exception e) {
        assertTrue(e.getCause() instanceof StoreException);
        assertEquals(StoreErrorCodes.IDNotFound, ((StoreException) e.getCause()).getErrorCode());
      }
    } finally {
      executorService.shutdownNow();
    }
  }
Test the case where a Put happens while a Delete is doing the preliminary check.
Since the delete happens before put, delete should return a ID_NOT_FOUND error.
@throws Exception
ambry-store/src/test/java/com/github/ambry/store/BlobStoreTest.java