List<RemoteReplicaInfo> getRemoteReplicaInfos(MockHost remoteHost, ReplicationTest.StoreEventListener listener) {
    List<? extends ReplicaId> replicaIds = clusterMap.getReplicaIds(dataNodeId);
    List<RemoteReplicaInfo> remoteReplicaInfos = new ArrayList<>();
    for (ReplicaId replicaId : replicaIds) {
      for (ReplicaId peerReplicaId : replicaId.getPeerReplicaIds()) {
        if (peerReplicaId.getDataNodeId().equals(remoteHost.dataNodeId)) {
          PartitionId partitionId = replicaId.getPartitionId();
          InMemoryStore store = storesByPartition.computeIfAbsent(partitionId,
              partitionId1 -> new InMemoryStore(partitionId, infosByPartition.computeIfAbsent(partitionId1,
                  (Function<PartitionId, List<MessageInfo>>) partitionId2 -> new ArrayList<>()),
                  buffersByPartition.computeIfAbsent(partitionId1,
                      (Function<PartitionId, List<ByteBuffer>>) partitionId22 -> new ArrayList<>()), listener));
          store.start();
          RemoteReplicaInfo remoteReplicaInfo =
              new RemoteReplicaInfo(peerReplicaId, replicaId, store, new MockFindToken(0, 0), Long.MAX_VALUE,
                  SystemTime.getInstance(), new Port(peerReplicaId.getDataNodeId().getPort(), PortType.PLAINTEXT),
                  maxRetryReplicationCount);
          remoteReplicaInfos.add(remoteReplicaInfo);
        }
      }
    }
    return remoteReplicaInfos;
  }
Gets the list of {@link RemoteReplicaInfo} from this host to the given {@code remoteHost}
@param remoteHost the host whose replica info is required.
@param listener the {@link ReplicationTest.StoreEventListener} to use.
@return the list of {@link RemoteReplicaInfo} from this host to the given {@code remoteHost}
ambry-replication/src/test/java/com/github/ambry/replication/MockHost.java