@Test
public void getSupplier_empty() {

    final KafkaProducerFactory kafkaProducerFactory = new KafkaProducerFactoryImpl(kafkaConfigDocCache);
    final KafkaConfigDoc kafkaConfigDoc = createKafkaConfigDoc("Config1", "v1");
    final DocRef docRef = DocRefUtil.create(kafkaConfigDoc);
    final SharedKafkaProducer sharedKafkaProducer = kafkaProducerFactory.getSharedProducer(docRef);
    // Cache knows nothing of the doc so there cannot be a producer
    assertThat(sharedKafkaProducer.getKafkaProducer()).isEmpty();
    assertThat(sharedKafkaProducer.hasKafkaProducer()).isFalse();
    // Check we can still close with an empty supplier
    sharedKafkaProducer.close();
}