CountEventsProjection implements Projection<Integer> { @Override public Integer project(List<Event> events) { return events.size(); }  @Override Integer project(List<Event> events); @Override String buildResultMessage(Integer projectResult);  }
@Test public void projectSingleQuestionQuiz() { final CountEventsProjection projection = new CountEventsProjection(); final int nrOfPlayers = projection.project(EventStreamFactory.buildSingleQuestionEventSream()); assertEquals(8, nrOfPlayers); }
@Test public void projectBasicQuiz() { final CountEventsProjection projection = new CountEventsProjection(); final int nrOfPlayers = projection.project(EventStreamFactory.buildBasicQuizEventSream()); assertEquals(17, nrOfPlayers); }