public static MessageInfo getMergedMessageInfo(StoreKey key, List<MessageInfo> partitionInfos) {
    MessageInfo info = getMessageInfo(key, partitionInfos, true, true, false);
    if (info == null) {
      info = getMessageInfo(key, partitionInfos, false, false, false);
    }
    MessageInfo ttlUpdateInfo = getMessageInfo(key, partitionInfos, false, false, true);
    if (ttlUpdateInfo != null) {
      info = new MessageInfo(info.getStoreKey(), info.getSize(), info.isDeleted(), true, info.isUndeleted(),
          ttlUpdateInfo.getExpirationTimeInMs(), info.getCrc(), info.getAccountId(), info.getContainerId(),
          info.getOperationTimeMs(), info.getLifeVersion());
    }
    return info;
  }
Returns a merged {@link MessageInfo} for {@code key}
@param key the {@link StoreKey} to look for
@param partitionInfos the {@link MessageInfo}s for the partition
@return a merged {@link MessageInfo} for {@code key}
ambry-replication/src/test/java/com/github/ambry/replication/ReplicationTestHelper.java