@Test public void testCheckWriterId() {
    Properties properties = new Properties();
    properties.setProperty(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9290");
    SimpleKafkaWriter
        writer =
        new SimpleKafkaWriter("t",
            null, properties);
    Assert.assertNotNull(writer.getWriterId());
  }
Test class for Kafka simple writer.
kafka-handler/src/test/org/apache/hadoop/hive/kafka/SimpleKafkaWriterTest.java