You can use the Kafka-test artifact:
<dependency> <groupId>org.apache.kafka</groupId> <artifactId>kafka_2.9.2</artifactId> <version>0.8.0</version> <classifier>test</classifier> <scope>test</scope> </dependency>
If you need a separate layout for zookeeper, the Apache curatorial test can do:
<dependency> <groupId>org.apache.curator</groupId> <version>2.3.2-SNAPSHOT</version> <artifactId>curator-test</artifactId> <scope>test</scope> </dependency>
source share