@Test
public void shouldCreateSpansOnConsume() {

  //Given
  final Map<TopicPartition, List<ConsumerRecord<String, String>>> topicPartitionAndRecords = new HashMap<>();
  final ConsumerRecord<String, String> record = new ConsumerRecord<>("topic", 0, 0L, "k", "v");
  topicPartitionAndRecords.put(
      new TopicPartition("topic", 0),
      Arrays.asList(record, record, record));
  final ConsumerRecords<String, String> records = new ConsumerRecords<>(topicPartitionAndRecords);
  final TracingConsumerInterceptor<String, String> interceptor = new TracingConsumerInterceptor<>();
  interceptor.configure(map);
  interceptor.tracing = tracing;
  //When
  interceptor.onConsume(records);
  final Spliterator<Span> span = spans.spliterator();
  long count = StreamSupport.stream(span, false).count();
  assertEquals(3, count);
}