title: KafkaEmbedded throwing ClassNotFoundException for SecurityProtocol
body: <p>My production code is working fine, but my integration test is throwing ClassNotFoundException for SecurityProtocol. I am using spring-boot-parent 1.5.10.RELEASE.</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.kafka&lt;/groupId&gt;
          &lt;artifactId&gt;spring-kafka&lt;/artifactId&gt;
          &lt;version&gt;1.3.3.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.kafka&lt;/groupId&gt;
          &lt;artifactId&gt;spring-kafka-test&lt;/artifactId&gt;
          &lt;version&gt;1.3.3.RELEASE&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>I am getting the below exception:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: org/apache/kafka/common/security/auth/SecurityProtocol
  
      at kafka.server.KafkaConfig$.&lt;init&gt;(KafkaConfig.scala:578)
      at kafka.server.KafkaConfig$.&lt;clinit&gt;(KafkaConfig.scala)
      at kafka.utils.TestUtils$.createBrokerConfig(TestUtils.scala:228)
      at kafka.utils.TestUtils.createBrokerConfig(TestUtils.scala)
      at org.springframework.kafka.test.rule.KafkaEmbedded.createProperties(KafkaEmbedded.java:214)
      at org.springframework.kafka.test.rule.KafkaEmbedded.before(KafkaEmbedded.java:191)
      at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
      at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
      at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
  Caused by: java.lang.ClassNotFoundException: org.apache.kafka.common.security.auth.SecurityProtocol
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 15 more
  </code></pre>
  
  <p>When I am using this pom, I am getting a different error:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.springframework.kafka&lt;/groupId&gt;
      &lt;artifactId&gt;spring-kafka&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.kafka&lt;/groupId&gt;
      &lt;artifactId&gt;spring-kafka-test&lt;/artifactId&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  
  java.lang.NoClassDefFoundError: kafka/utils/Time
      at com.betstars.eventdata.app.kafka.message.KafkaMessageSenderTest.&lt;clinit&gt;(KafkaMessageSenderTest.java:39)
      at sun.misc.Unsafe.ensureClassInitialized(Native Method)
      at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
      at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:156)
      at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088)
      at java.lang.reflect.Field.getFieldAccessor(Field.java:1069)
      at java.lang.reflect.Field.get(Field.java:393)
      at org.junit.runners.model.FrameworkField.get(FrameworkField.java:73)
      at org.junit.runners.model.TestClass.getAnnotatedFieldValues(TestClass.java:230)
      at org.junit.runners.ParentRunner.classRules(ParentRunner.java:255)
      at org.junit.runners.ParentRunner.withClassRules(ParentRunner.java:244)
      at org.junit.runners.ParentRunner.classBlock(ParentRunner.java:194)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:362)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
      at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
  Caused by: java.lang.ClassNotFoundException: kafka.utils.Time
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 19 more
  </code></pre>
  
  <p>And when I use the latest version, I am getting a different error:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.springframework.kafka&lt;/groupId&gt;
      &lt;artifactId&gt;spring-kafka&lt;/artifactId&gt;
      &lt;version&gt;2.1.2.RELEASE&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework.kafka&lt;/groupId&gt;
      &lt;artifactId&gt;spring-kafka-test&lt;/artifactId&gt;
      &lt;version&gt;2.1.2.RELEASE&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  
  java.lang.NoSuchMethodError: org.springframework.util.Assert.state(ZLjava/util/function/Supplier;)V
  
      at org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.determineInferredType(MessagingMessageListenerAdapter.java:396)
      at org.springframework.kafka.listener.adapter.MessagingMessageListenerAdapter.&lt;init&gt;(MessagingMessageListenerAdapter.java:100)
      at org.springframework.kafka.listener.adapter.RecordMessagingMessageListenerAdapter.&lt;init&gt;(RecordMessagingMessageListenerAdapter.java:61)
      at org.springframework.kafka.config.MethodKafkaListenerEndpoint.createMessageListenerInstance(MethodKafkaListenerEndpoint.java:172)
      at org.springframework.kafka.config.MethodKafkaListenerEndpoint.createMessageListener(MethodKafkaListenerEndpoint.java:132)
      at org.springframework.kafka.config.AbstractKafkaListenerEndpoint.setupMessageListener(AbstractKafkaListenerEndpoint.java:355)
      at org.springframework.kafka.config.AbstractKafkaListenerEndpoint.setupListenerContainer(AbstractKafkaListenerEndpoint.java:340)
  </code></pre>