@After public void tearDown() {
    LOG.info("tearDown");
    consumer.close();
    consumer = null;
  }
Test class for Hive Kafka Producer.
kafka-handler/src/test/org/apache/hadoop/hive/kafka/HiveKafkaProducerTest.java