counter: 1.2.8 - Reconfigured tests to send data as domain-instances
[demos/kafka/wordcount] / src / test / java / de / juplo / kafka / wordcount / counter / CounterStreamProcessorTopologyTest.java
index 2c8bd1e..902e93f 100644 (file)
@@ -8,6 +8,7 @@ import org.apache.kafka.streams.Topology;
 import org.apache.kafka.streams.TopologyTestDriver;
 import org.apache.kafka.streams.state.Stores;
 import org.junit.jupiter.api.Test;
+import org.springframework.kafka.support.serializer.JsonSerializer;
 
 import java.util.List;
 import java.util.Properties;
@@ -26,17 +27,17 @@ public class CounterStreamProcessorTopologyTest
         OUT,
         Stores.inMemoryKeyValueStore("TOPOLOGY-TEST"));
 
-    CounterApplicationConfiguriation config =
+    CounterApplicationConfiguriation applicationConfiguriation =
         new CounterApplicationConfiguriation();
-    Properties properties =
-        config.propertyMap(new CounterApplicationProperties());
+    Properties streamProcessorProperties =
+        applicationConfiguriation.streamProcessorProperties(new CounterApplicationProperties());
 
-    TopologyTestDriver testDriver = new TopologyTestDriver(topology, properties);
+    TopologyTestDriver testDriver = new TopologyTestDriver(topology, streamProcessorProperties);
 
-    TestInputTopic<String, String> in = testDriver.createInputTopic(
+    TestInputTopic<String, Word> in = testDriver.createInputTopic(
         IN,
-        new StringSerializer(),
-        new StringSerializer());
+        new JsonSerializer<>(),
+        new JsonSerializer<>());
 
     TestOutputTopic<String, String> out = testDriver.createOutputTopic(
         OUT,