protected void assertMissingKeys(int[] expectedMissingKeysSum, MockHost remoteHost, ReplicaThread replicaThread) {
    Map<DataNodeId, List<RemoteReplicaInfo>> remoteReplicaInfoByDataNode = replicaThread.getRemoteReplicaInfos();
    for (int i = 0; i < expectedMissingKeysSum.length; i++) {
      RemoteReplicaInfo remoteReplicaInfo = remoteReplicaInfoByDataNode.get(remoteHost.dataNodeId).get(i);
      MockFindToken token = (MockFindToken) remoteReplicaInfo.getToken();
      int ind = token.getIndex();
      PartitionId partitionId = remoteReplicaInfo.getReplicaId().getPartitionId();
      List<MessageInfo> messageInfos = remoteHost.infosByPartition.get(partitionId);
      assertEquals("MessageInfo list size: " + messageInfos.size() + " index : " + ind, expectedMissingKeysSum[i],
          messageInfos.size() - ind);
    }
  }
Asserts the number of missing keys between the local and remote replicas
@param expectedMissingKeysSum the number of missing keys expected for each replica
@param remoteHost the remote host that keys are being pulled from
@param replicaThread replicaThread that will be performing replication
@throws Exception
ambry-replication/src/test/java/com/github/ambry/replication/ReplicationTestHelper.java