projects
/
demos
/
kafka
/
wordcount
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
counter: 1.2.11 - Refactored test-classes (DRY for test-config)
[demos/kafka/wordcount]
/
src
/
test
/
java
/
de
/
juplo
/
kafka
/
wordcount
/
counter
/
CounterStreamProcessorTopologyTest.java
diff --git
a/src/test/java/de/juplo/kafka/wordcount/counter/CounterStreamProcessorTopologyTest.java
b/src/test/java/de/juplo/kafka/wordcount/counter/CounterStreamProcessorTopologyTest.java
index
1bdfd48
..
159123b
100644
(file)
--- a/
src/test/java/de/juplo/kafka/wordcount/counter/CounterStreamProcessorTopologyTest.java
+++ b/
src/test/java/de/juplo/kafka/wordcount/counter/CounterStreamProcessorTopologyTest.java
@@
-10,7
+10,8
@@
import org.springframework.kafka.support.serializer.JsonSerializer;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.List;
import java.util.Map;
import java.util.Properties;
-import java.util.stream.Collectors;
+
+import static de.juplo.kafka.wordcount.counter.TestData.convertToMap;
public class CounterStreamProcessorTopologyTest
public class CounterStreamProcessorTopologyTest
@@
-30,15
+31,8
@@
public class CounterStreamProcessorTopologyTest
new CounterApplicationConfiguriation();
Properties streamProcessorProperties =
applicationConfiguriation.streamProcessorProperties(new CounterApplicationProperties());
new CounterApplicationConfiguriation();
Properties streamProcessorProperties =
applicationConfiguriation.streamProcessorProperties(new CounterApplicationProperties());
+ Map<String, Object> propertyMap = convertToMap(streamProcessorProperties);
- Map<String, ?> propertyMap = streamProcessorProperties
- .entrySet()
- .stream()
- .collect(
- Collectors.toMap(
- entry -> (String)entry.getKey(),
- entry -> entry.getValue()
- ));
JsonSerde<?> keySerde = new JsonSerde<>();
keySerde.configure(propertyMap, true);
JsonSerde<?> valueSerde = new JsonSerde<>();
JsonSerde<?> keySerde = new JsonSerde<>();
keySerde.configure(propertyMap, true);
JsonSerde<?> valueSerde = new JsonSerde<>();