X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fde%2Fjuplo%2Fkafka%2Fwordcount%2Fcounter%2FTestData.java;fp=src%2Ftest%2Fjava%2Fde%2Fjuplo%2Fkafka%2Fwordcount%2Fcounter%2FTestData.java;h=1ecfdbdea8a0b0a0e0c3c9eac1d93241d79b5b9e;hb=5aa03935c0d09c363dc2b3ddcbd5fc9aac93b8e1;hp=54e62878eec602a682a53dce9ba60315b94070d9;hpb=98f4de98c6c3f527496d85b5e32fef0a3a23cbd5;p=demos%2Fkafka%2Fwordcount 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 54e6287..1ecfdbd 100644 --- a/src/test/java/de/juplo/kafka/wordcount/counter/TestData.java +++ b/src/test/java/de/juplo/kafka/wordcount/counter/TestData.java @@ -92,7 +92,9 @@ class TestData private static int countMessagesForWord(TestOutputWord word, MultiValueMap messagesForUsers) { - return messagesForUsers.get(word).size(); + return messagesForUsers.get(word) == null + ? 0 + : messagesForUsers.get(word).size(); } static void assertExpectedState(ReadOnlyKeyValueStore store)