private void checkStoreInfo(StoreInfo storeInfo, Set<MockId> expectedKeys, short lifeVersion) throws IOException {
    List<MessageInfo> messageInfos = storeInfo.getMessageReadSetInfo();
    MessageReadSet readSet = storeInfo.getMessageReadSet();
    assertEquals("ReadSet contains an unexpected number of messages", expectedKeys.size(), readSet.count());
    Set<MockId> examinedKeys = new HashSet<>();
    for (int i = 0; i < messageInfos.size(); i++) {
      MessageInfo messageInfo = messageInfos.get(i);
      MockId id = (MockId) messageInfo.getStoreKey();
      MessageInfo expectedInfo = allKeys.get(id).getFirst();
      assertEquals("Unexpected size in MessageInfo", expectedInfo.getSize(), messageInfo.getSize());
      assertEquals("AccountId mismatch", expectedInfo.getAccountId(), messageInfo.getAccountId());
      assertEquals("ContainerId mismatch", expectedInfo.getContainerId(), messageInfo.getContainerId());
      assertEquals("OperationTime mismatch", expectedInfo.getOperationTimeMs(), messageInfo.getOperationTimeMs());
      assertEquals("isTTLUpdated not as expected", ttlUpdatedKeys.contains(id), messageInfo.isTtlUpdated());
      assertEquals("isDeleted not as expected", deletedKeys.contains(id), messageInfo.isDeleted());
      assertEquals("isUndeleted not as expected", undeletedKeys.contains(id), messageInfo.isUndeleted());
      if (IndexValue.hasLifeVersion(lifeVersion)) {
        assertEquals("lifeVersion not as expected", lifeVersion, messageInfo.getLifeVersion());
      }
      long expiresAtMs = ttlUpdatedKeys.contains(id) ? Utils.Infinite_Time : expectedInfo.getExpirationTimeInMs();
      expiresAtMs = Utils.getTimeInMsToTheNearestSec(expiresAtMs);
      assertEquals("Unexpected expiresAtMs in MessageInfo", expiresAtMs, messageInfo.getExpirationTimeInMs());
      assertEquals("Unexpected key in readSet", id, readSet.getKeyAt(i));
      assertEquals("Unexpected size in ReadSet", expectedInfo.getSize(), readSet.sizeInBytes(i));
      ByteBuffer readBuf = ByteBuffer.allocate((int) expectedInfo.getSize());
      ByteBufferOutputStream stream = new ByteBufferOutputStream(readBuf);
      WritableByteChannel channel = Channels.newChannel(stream);
      readSet.writeTo(i, channel, 0, expectedInfo.getSize());
      ByteBuffer expectedData = allKeys.get(id).getSecond();
      assertArrayEquals("Data obtained from reset does not match original", expectedData.array(), readBuf.array());
      examinedKeys.add(id);
    }
    assertEquals("Expected and examined keys do not match", expectedKeys, examinedKeys);
  }
Verifies the provided {@code storeInfo} for correctness of the {@link MessageInfo}. Also reads the blob as
described by the {@link MessageReadSet} inside {@code storeInfo} to verify that it matches the reference.
@param storeInfo the {@link StoreInfo} to verify.
@param expectedKeys all the {@link MockId}s that are expected to be found in {@code storeInfo}.
@param lifeVersion the expected life version for all the keys.
@throws IOException
ambry-store/src/test/java/com/github/ambry/store/BlobStoreTest.java