Map<PartitionId, List<MessageInfo>> getMissingInfos(Map<PartitionId, List<MessageInfo>> other,
      StoreKeyConverter storeKeyConverter) throws Exception {
    Map<PartitionId, List<MessageInfo>> missingInfos = new HashMap<>();
    for (Map.Entry<PartitionId, List<MessageInfo>> entry : infosByPartition.entrySet()) {
      PartitionId partitionId = entry.getKey();
      for (MessageInfo messageInfo : entry.getValue()) {
        boolean found = false;
        StoreKey convertedKey;
        if (storeKeyConverter == null) {
          convertedKey = messageInfo.getStoreKey();
        } else {
          Map<StoreKey, StoreKey> map = storeKeyConverter.convert(Collections.singletonList(messageInfo.getStoreKey()));
          convertedKey = map.get(messageInfo.getStoreKey());
          if (convertedKey == null) {
            continue;
          }
        }
        for (MessageInfo otherInfo : other.get(partitionId)) {
          if (convertedKey.equals(otherInfo.getStoreKey()) && messageInfo.isDeleted() == otherInfo.isDeleted()) {
            found = true;
            break;
          }
        }
        if (!found) {
          missingInfos.computeIfAbsent(partitionId, partitionId1 -> new ArrayList<>()).add(messageInfo);
        }
      }
    }
    return missingInfos;
  }
Gets the message infos that are present in this host but missing in {@code other}.
@param other the list of {@link MessageInfo} to check against.
@return the message infos that are present in this host but missing in {@code other}.
ambry-replication/src/test/java/com/github/ambry/replication/MockHost.java