@Override
	protected void cleanupResource() throws Exception {
		if (embedded) {
			try {
				kafkaServer.shutdown();
			}
			catch (Exception e) {
				// ignore errors on shutdown
				log.error(e.getMessage(), e);
			}
			try {
				Utils.rm(kafkaServer.config().logDirs());
			}
			catch (Exception e) {
				// ignore errors on shutdown
				log.error(e.getMessage(), e);
			}
		}
		try {
			zkClient.close();
		}
		catch (ZkInterruptedException e) {
			// ignore errors on shutdown
			log.error(e.getMessage(), e);
		}
		if (embedded) {
			try {
				zookeeper.shutdown();
			}
			catch (Exception e) {
				// ignore errors on shutdown
				log.error(e.getMessage(), e);
			}
		}
	}
JUnit {@link Rule} that starts an embedded Kafka server (with an associated Zookeeper)

@author Ilayaperumal Gopinathan
@author Marius Bogoevici
@author Gary Russell
@since 1.1
spring-xd-test/src/main/java/org/springframework/xd/test/kafka/KafkaTestSupport.java