private void verifyPutFailure(MockId idToPut, StoreErrorCodes expectedErrorCode) {
    long crc = random.nextLong();
    MessageInfo info =
        new MessageInfo(idToPut, PUT_RECORD_SIZE, false, false, false, expiresAtMs, crc, idToPut.getAccountId(),
            idToPut.getContainerId(), Utils.Infinite_Time, (short) 0);
    MessageWriteSet writeSet =
        new MockMessageWriteSet(Collections.singletonList(info), Collections.singletonList(ByteBuffer.allocate(1)));
    try {
      store.put(writeSet);
      fail("Store PUT should have failed");
    } catch (StoreException e) {
      assertEquals("Unexpected StoreErrorCode", expectedErrorCode, e.getErrorCode());
    }
  }
Verifies that PUT fails.
@param idToPut the {@link MockId} to PUT.
@param expectedErrorCode the expected {@link StoreErrorCodes} for the failure.
ambry-store/src/test/java/com/github/ambry/store/BlobStoreTest.java