### Question:
KafkaClientProvider { public Optional<KafkaProducer<String, byte[]>> getDefaultProducer() { return getProducer(new StringSerializer(), new ByteArraySerializer()); } KafkaClientProvider(@Nullable final List<String> brokerList); Optional<KafkaProducer<String, byte[]>> getDefaultProducer(); Optional<KafkaProducer<K, V>> getProducer(
      @NotNull final Serializer<K> keySerializer,
      @NotNull final Serializer<V> valueSerializer); static final int MAX_BLOCK_TIMEOUT; }### Answer:
@Test public void testNoBrokersConfigured() { final KafkaClientProvider provider = new KafkaClientProvider(null); assertEquals("KafkaClientProvider should return absent when null list of seed hosts is passed", Optional.empty(), provider.getDefaultProducer()); }
@Test public void testReturnsProvider() { final ImmutableList<String> hosts = ImmutableList.of("localhost:2181"); final KafkaClientProvider provider = new KafkaClientProvider(hosts); assertTrue("Expected KafkaProvider to return non-absent KafkaProducer " + "when passed a list of seed hosts", provider.getDefaultProducer().isPresent()); }