private void verifyUndelete(BlobId blobId, long opTimeMs, MessageWriteSet messageWriteSet) throws Exception {
    BlobId key = (BlobId) conversionMap.getOrDefault(blobId, blobId);
    assertEquals("There should be one message in the write set", 1, messageWriteSet.getMessageSetInfo().size());
    MessageInfo info = messageWriteSet.getMessageSetInfo().get(0);

    // verify stream
    ByteBuffer record = getDataInWriteSet(messageWriteSet, (int) info.getSize());
    int expectedSize = record.remaining();
    InputStream stream = new ByteBufferInputStream(record);

    // verify stream
    MessageFormatInputStreamTest.checkUndeleteMessage(stream, null, key, key.getAccountId(), key.getContainerId(),
        opTimeMs, storageManager.returnValueOfUndelete);

    // verify MessageInfo
    // since the record has been verified, the buffer size before verification is a good indicator of size
    MessageInfoTest.checkGetters(info, key, expectedSize, false, false, true, Utils.Infinite_Time, null,
        key.getAccountId(), key.getContainerId(), opTimeMs, storageManager.returnValueOfUndelete);
  }
Verifies that the UNDELETE request was delivered to the {@link Store} correctly.
@param blobId the {@link BlobId} that was updated
@param opTimeMs the op time (in ms)
@param messageWriteSet the {@link MessageWriteSet} received at the {@link Store}
@throws IOException
@throws MessageFormatException
@throws StoreException
ambry-server/src/test/java/com/github/ambry/server/AmbryServerRequestsTest.java