static void injectInputMessages(BiConsumer<String, Word> 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"),
.containsExactlyElementsOf(counter));
}
- static KeyValue<Word, WordCounter>[] expectedMessagesArray = new KeyValue[]
+ static final KeyValue<Word, WordCounter>[] EXPECTED_MESSAGES = new KeyValue[]
{
KeyValue.pair(
Word.of("peter","Hallo"),
{
expectedMessages = new LinkedMultiValueMap<>();
Stream
- .of(expectedMessagesArray)
+ .of(EXPECTED_MESSAGES)
.forEach(keyValue -> expectedMessages.add(keyValue.key, keyValue.value));
}