top10: 1.2.1 - Refined `TestData` clearified concerns
[demos/kafka/wordcount] / src / test / java / de / juplo / kafka / wordcount / top10 / Top10ApplicationIT.java
index a1bc1f0..f5ef236 100644 (file)
@@ -1,13 +1,16 @@
 package de.juplo.kafka.wordcount.top10;
 
-import de.juplo.kafka.wordcount.counter.TestWord;
 import de.juplo.kafka.wordcount.counter.TestCounter;
+import de.juplo.kafka.wordcount.counter.TestWord;
 import de.juplo.kafka.wordcount.query.TestRanking;
 import de.juplo.kafka.wordcount.query.TestUser;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.kafka.streams.state.KeyValueBytesStoreSupplier;
 import org.apache.kafka.streams.state.Stores;
-import org.junit.jupiter.api.*;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.TestConfiguration;
@@ -24,7 +27,6 @@ import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
 
 import java.time.Duration;
-import java.util.stream.Stream;
 
 import static de.juplo.kafka.wordcount.top10.Top10StreamProcessor.STORE_NAME;
 import static org.awaitility.Awaitility.await;
@@ -65,8 +67,8 @@ public class Top10ApplicationIT
        public static void testSendMessage(
                        @Autowired KafkaTemplate<TestWord, TestCounter> kafkaTemplate)
        {
-               Stream
-                               .of(TestData.INPUT_MESSAGES)
+               TestData
+                               .getInputMessages()
                                .forEach(kv ->
                                {
                                        try