private void setupSystemFactory(Config config) {
    when(this.systemFactory.getProducer(CHECKPOINT_SYSTEM, config, this.metricsRegistry,
        KafkaCheckpointManager.class.getSimpleName())).thenReturn(this.systemProducer);
    when(this.systemFactory.getConsumer(CHECKPOINT_SYSTEM, config, this.metricsRegistry,
        KafkaCheckpointManager.class.getSimpleName())).thenReturn(this.systemConsumer);
    when(this.systemFactory.getAdmin(CHECKPOINT_SYSTEM, config,
        KafkaCheckpointManager.class.getSimpleName())).thenReturn(this.systemAdmin);
    when(this.systemFactory.getAdmin(CHECKPOINT_SYSTEM, config,
        KafkaCheckpointManager.class.getSimpleName() + "createResource")).thenReturn(this.createResourcesSystemAdmin);
  }
Create a new {@link SystemConsumer} that returns a list of messages sequentially at each subsequent poll.

@param pollOutputs a list of poll outputs to be returned at subsequent polls.
                   The i'th call to consumer.poll() will return the list at pollOutputs[i]
samza-kafka/src/test/java/org/apache/samza/checkpoint/kafka/TestKafkaCheckpointManager.java