public static void addUndeleteMessagesToReplicasOfPartition(PartitionId partitionId, StoreKey id,
      List<MockHost> hosts, short lifeVersion) throws MessageFormatException, IOException {
    for (MockHost host : hosts) {
      MessageInfo latestInfo = getMergedMessageInfo(id, host.infosByPartition.get(partitionId));
      short aid;
      short cid;
      long expirationTime;
      if (latestInfo == null) {
        aid = ((BlobId) id).getAccountId();
        cid = ((BlobId) id).getContainerId();
        expirationTime = EXPIRY_TIME_MS;
      } else {
        aid = latestInfo.getAccountId();
        cid = latestInfo.getContainerId();
        expirationTime = latestInfo.getExpirationTimeInMs();
      }
      ByteBuffer buffer = getUndeleteMessage(id, aid, cid, lifeVersion, CONSTANT_TIME_MS);
      host.addMessage(partitionId,
          new MessageInfo(id, buffer.remaining(), false, false, true, expirationTime, null, aid, cid, CONSTANT_TIME_MS,
              lifeVersion), buffer.duplicate());
    }
  }
For the given partitionId, constructs ttl update messages and adds them to the given lists.
@param partitionId the {@link PartitionId} to use for generating the {@link StoreKey} of the message.
@param id the {@link StoreKey} to create a ttl update message for.
@param hosts the list of {@link MockHost} all of which will be populated with the messages.
@param expirationTime
@throws MessageFormatException
@throws IOException
ambry-replication/src/test/java/com/github/ambry/replication/ReplicationTestHelper.java