splitter: 1.2.0 - Refined `TestData` clearified concerns
[demos/kafka/wordcount] / src / test / java / de / juplo / kafka / wordcount / splitter / TestData.java
index 8c343d5..a3f7575 100644 (file)
@@ -19,7 +19,12 @@ public class TestData
        static final String KLAUS = "klaus";
 
 
-       static final KeyValue<String, TestRecording>[] INPUT_MESSAGES = new KeyValue[]
+       static final Stream<KeyValue<String, TestRecording>> getInputMessages()
+       {
+               return Stream.of(INPUT_MESSAGES);
+       }
+
+       private static final KeyValue<String, TestRecording>[] INPUT_MESSAGES = new KeyValue[]
        {
                        new KeyValue<>(
                                        PETER,
@@ -40,7 +45,7 @@ public class TestData
                                                assertThat(receivedMessages.get(user)).containsExactlyElementsOf(word)));
        }
 
-       static final KeyValue<String, TestWord>[] EXPECTED_MESSAGES = new KeyValue[]
+       private static final KeyValue<String, TestWord>[] EXPECTED_MESSAGES = new KeyValue[]
        {
                        KeyValue.pair(
                                        "peter",