From 7474f0e1fc7028e60ef9526fec86bfb8824c6517 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 27 May 2024 22:23:58 +0200 Subject: [PATCH] counter: 1.2.15 - Made in/out messages in `TestData` immutable --- .../java/de/juplo/kafka/wordcount/counter/TestData.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/de/juplo/kafka/wordcount/counter/TestData.java b/src/test/java/de/juplo/kafka/wordcount/counter/TestData.java index ab265a9..6110f80 100644 --- a/src/test/java/de/juplo/kafka/wordcount/counter/TestData.java +++ b/src/test/java/de/juplo/kafka/wordcount/counter/TestData.java @@ -20,11 +20,11 @@ class TestData static void injectInputMessages(BiConsumer consumer) { Stream - .of(inputMessagesArray) + .of(INPUT_MESSAGES) .forEach(word -> consumer.accept(word.getUser(), word)); } - static Word[] inputMessagesArray = new Word[] + static final Word[] INPUT_MESSAGES = new Word[] { Word.of("peter","Hallo"), Word.of("klaus","Müsch"), @@ -47,7 +47,7 @@ class TestData .containsExactlyElementsOf(counter)); } - static KeyValue[] expectedMessagesArray = new KeyValue[] + static final KeyValue[] EXPECTED_MESSAGES = new KeyValue[] { KeyValue.pair( Word.of("peter","Hallo"), @@ -89,7 +89,7 @@ class TestData { expectedMessages = new LinkedMultiValueMap<>(); Stream - .of(expectedMessagesArray) + .of(EXPECTED_MESSAGES) .forEach(keyValue -> expectedMessages.add(keyValue.key, keyValue.value)); } -- 2.20.1