public static void addTtlUpdateMessagesToReplicasOfPartition(PartitionId partitionId, StoreKey id,
      List<MockHost> hosts, long expirationTime) throws MessageFormatException, IOException {
    MessageInfo putMsg = getMessageInfo(id, hosts.get(0).infosByPartition.get(partitionId), false, false, false);
    short aid;
    short cid;
    short lifeVersion;
    if (putMsg == null) {
      // the StoreKey must be a BlobId in this case (to get the account and container id)
      aid = ((BlobId) id).getAccountId();
      cid = ((BlobId) id).getContainerId();
      lifeVersion = 0;
    } else {
      aid = putMsg.getAccountId();
      cid = putMsg.getContainerId();
      lifeVersion = putMsg.getLifeVersion();
    }
    ByteBuffer buffer = getTtlUpdateMessage(id, aid, cid, expirationTime, CONSTANT_TIME_MS);
    for (MockHost host : hosts) {
      host.addMessage(partitionId,
          new MessageInfo(id, buffer.remaining(), false, true, false, 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