@Override
    public short undelete(MessageInfo info) throws StoreException {
      operationReceived = RequestOrResponseType.UndeleteRequest;
      try {
        MessageFormatInputStream stream =
            new UndeleteMessageFormatInputStream(info.getStoreKey(), info.getAccountId(), info.getContainerId(),
                info.getOperationTimeMs(), returnValueOfUndelete);
        // Update info to add stream size;
        info = new MessageInfo(info.getStoreKey(), stream.getSize(), false, false, true, Utils.Infinite_Time, null,
            info.getAccountId(), info.getContainerId(), info.getOperationTimeMs(), returnValueOfUndelete);
        ArrayList<MessageInfo> infoList = new ArrayList<>();
        infoList.add(info);
        messageWriteSetReceived = new MessageFormatWriteSet(stream, infoList, false);
      } catch (Exception e) {
        throw new StoreException("Unknown error while trying to undelete blobs from store", e,
            StoreErrorCodes.UnknownError);
      }
      throwExceptionIfRequired();
      checkValidityOfIds(messageWriteSetReceived.getMessageSetInfo()
          .stream()
          .map(MessageInfo::getStoreKey)
          .collect(Collectors.toList()));
      return returnValueOfUndelete;
    }
Mocked {@link Store} that is intended to perform predefined behavior.
ambry-server/src/test/java/com/github/ambry/server/MockStorageManager.java