public static void addPutMessagesToReplicasOfPartition(StoreKey id, short accountId, short containerId,
      PartitionId partitionId, List<MockHost> hosts, long operationTime, long expirationTime)
      throws MessageFormatException, IOException {
    // add a PUT message with expiration time less than VCR threshold to remote host.
    boolean toEncrypt = TestUtils.RANDOM.nextBoolean();
    ReplicationTest.PutMsgInfoAndBuffer msgInfoAndBuffer = createPutMessage(id, accountId, containerId, toEncrypt);
    for (MockHost host : hosts) {
      host.addMessage(partitionId,
          new MessageInfo(id, msgInfoAndBuffer.byteBuffer.remaining(), false, false, false, expirationTime, null,
              accountId, containerId, operationTime, (short) 0), msgInfoAndBuffer.byteBuffer);
    }
  }
For the given partitionId, constructs a PUT messages and adds it to the given hosts.
@param id the {@link StoreKey} to create a put message for.
@param accountId the accountId of this message.
@param containerId the containerId of this message.
@param partitionId the {@link PartitionId} to use for generating the {@link StoreKey} of the message.
@param hosts the list of {@link MockHost} all of which will be populated with the messages.
@param operationTime the operation of this message.
@param expirationTime the expirationTime of this message.
@throws MessageFormatException
@throws IOException
ambry-replication/src/test/java/com/github/ambry/replication/ReplicationTestHelper.java