It seems like the Kafka test driver is not compatible with the latest
kafka-streams API. When I use the following two dependencies together.
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams-test-utils</artifactId>
<version>2.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
<version>2.2.0</version>
<scope>compile</scope>
</dependency>
I get the following compiler error:
java.lang.NoSuchMethodError:
org.apache.kafka.common.serialization.Serializer.serialize(Ljava/lang/String;Lorg/apache/kafka/common/header/Headers;Ljava/lang/Object;)[B
at
In my unit test file for this function call:
testDriver.pipeInput(statusFactory.create(TopicNames.ENVELOPE_STATUS,
"1000",
new Status("FIN", "1000", "d200", EnvelopeState.DRAFT, new
Date().getTime(), "draft", null, null)));
Anyone run into this problem? Changing to version 2.0.1 or Kafka Streams
makes everything work.