import java.util.function.Function;
import java.util.stream.Stream;
-import static de.juplo.kafka.wordcount.stats.StatsStreamProcessor.STATS_TYPE;
import static org.assertj.core.api.Assertions.assertThat;
class TestData
{
- static final TestUser PETER = TestUser.of(STATS_TYPE, "peter");
- static final TestUser KLAUS = TestUser.of(STATS_TYPE, "klaus");
+ static final TestUser PETER = TestUser.of(StatisticsType.POPULAR.name(), "peter");
+ static final TestUser KLAUS = TestUser.of(StatisticsType.POPULAR.name(), "klaus");
+ static final TestUser OTHER_CHANNEL = TestUser.of("COUNTER", "klaus");
static final Stream<KeyValue<TestUser, TestRanking>> getTop10Messages()
{
PETER,
TestRanking.of(
TestEntry.of("Hallo", 1l))),
+ KeyValue.pair( // BOOM!
+ OTHER_CHANNEL,
+ TestRanking.of(
+ TestEntry.of("Müsch", 1l))),
KeyValue.pair( // 1
KLAUS,
TestRanking.of(
TestRanking.of(
TestEntry.of("Müsch", 2l),
TestEntry.of("s", 2l))),
+ KeyValue.pair( // BOOM!
+ KLAUS,
+ TestRanking.of(
+ TestEntry.of("Müsch", 2l),
+ TestEntry.of("s", 2l))),
KeyValue.pair( // 9
PETER,
TestRanking.of(