- static Message peter1 = Message.of(
- "{\"username\":\"peter\",\"word\":\"Hallo\"}",
- "1");
- static Message peter2 = Message.of(
- "{\"username\":\"peter\",\"word\":\"Welt\"}",
- "1");
- static Message peter3 = Message.of(
- "{\"username\":\"peter\",\"word\":\"Boäh\"}",
- "1");
- static Message peter4 = Message.of(
- "{\"username\":\"peter\",\"word\":\"Welt\"}",
- "2");
- static Message peter5 = Message.of(
- "{\"username\":\"peter\",\"word\":\"Boäh\"}",
- "2");
- static Message peter6 = Message.of(
- "{\"username\":\"peter\",\"word\":\"Boäh\"}",
- "3");
+ private static final KeyValue<TestOutputWord, TestOutputWordCounter>[] EXPECTED_MESSAGES = new KeyValue[]
+ {
+ KeyValue.pair(
+ TestOutputWord.of(PETER, "Hallo"),
+ TestOutputWordCounter.of(PETER, "Hallo",1)),
+ KeyValue.pair(
+ TestOutputWord.of(KLAUS, "Müsch"),
+ TestOutputWordCounter.of(KLAUS, "Müsch",1)),
+ KeyValue.pair(
+ TestOutputWord.of(PETER, "Welt"),
+ TestOutputWordCounter.of(PETER, "Welt",1)),
+ KeyValue.pair(
+ TestOutputWord.of(KLAUS, "Müsch"),
+ TestOutputWordCounter.of(KLAUS, "Müsch",2)),
+ KeyValue.pair(
+ TestOutputWord.of(KLAUS, "s"),
+ TestOutputWordCounter.of(KLAUS, "s",1)),
+ KeyValue.pair(
+ TestOutputWord.of(PETER, "Boäh"),
+ TestOutputWordCounter.of(PETER, "Boäh",1)),
+ KeyValue.pair(
+ TestOutputWord.of(PETER, "Welt"),
+ TestOutputWordCounter.of(PETER, "Welt",2)),
+ KeyValue.pair(
+ TestOutputWord.of(PETER, "Boäh"),
+ TestOutputWordCounter.of(PETER, "Boäh",2)),
+ KeyValue.pair(
+ TestOutputWord.of(KLAUS, "s"),
+ TestOutputWordCounter.of(KLAUS, "s",2)),
+ KeyValue.pair(
+ TestOutputWord.of(PETER, "Boäh"),
+ TestOutputWordCounter.of(PETER, "Boäh",3)),
+ KeyValue.pair(
+ TestOutputWord.of(KLAUS, "s"),
+ TestOutputWordCounter.of(KLAUS, "s",3)),
+ };