private void checkRecord(MockId id, BlobReadOptions options) throws IOException {
    MessageReadSet readSet = new StoreMessageReadSet(Arrays.asList(options));
    IndexValue value = state.getExpectedValue(id, true);
    assertEquals("Unexpected key in BlobReadOptions", id, options.getMessageInfo().getStoreKey());
    assertEquals("Unexpected size in BlobReadOptions", value.getSize(), options.getMessageInfo().getSize());
    assertEquals("Unexpected expiresAtMs in BlobReadOptions", value.getExpiresAtMs(),
        options.getMessageInfo().getExpirationTimeInMs());
    if (!state.index.hardDeleter.enabled.get() || !state.deletedKeys.contains(id)) {
      ByteBuffer readBuf = ByteBuffer.allocate((int) value.getSize());
      ByteBufferOutputStream stream = new ByteBufferOutputStream(readBuf);
      WritableByteChannel channel = Channels.newChannel(stream);
      readSet.writeTo(0, channel, 0, value.getSize());
      byte[] expectedData = state.getExpectedData(id, true);
      assertArrayEquals("Data obtained from reset does not match original", expectedData, readBuf.array());
    }
  }
Checks the record of an id by ensuring that the {@link BlobReadOptions} received from the store matches what is
expected. Also checks the data if the key is not deleted and hard delete enabled.
@param id the {@link MockId} whose record needs to be checked.
@param options the {@link BlobReadOptions} received from the {@link PersistentIndex}.
@throws IOException
ambry-store/src/test/java/com/github/ambry/store/BlobStoreCompactorTest.java