### Question:
SuiteEventDemuxer implements MessageSender<Event<SuiteListener>> { public void visitRun(RunId runId, RunVisitor visitor) { visitRun(runId, new RunEventDenormalizer(visitor)); }  @Override void send(Event<SuiteListener> message); boolean isSuiteFinished(); void visitAllRuns(RunVisitor visitor); void visitAllRuns(SuiteListener visitor); void visitRun(RunId runId, RunVisitor visitor); void visitRun(RunId runId, SuiteListener visitor); String getTestName(TestFile testFile, TestId testId);  }### Answer:
@Test public void allows_runs_to_be_visited_individually() { toDemuxer.onRunStarted(new RunId(1), TEST_FILE_1); toDemuxer.onRunStarted(new RunId(2), TEST_FILE_2); RunVisitor visitor = mock(RunVisitor.class); demuxer.visitRun(new RunId(1), visitor); verify(visitor).onRunStarted(new RunId(1), TEST_FILE_1); verifyNoMoreInteractions(visitor); }
@Test public void supports_printing_after_the_run_is_finished() { RunId runId = new RunId(1); toDemuxer.onRunStarted(runId, TEST_FILE_1); toDemuxer.onTestStarted(runId, TestId.ROOT); toDemuxer.onTestFinished(runId); toDemuxer.onRunFinished(runId); toDemuxer.onPrintedOut(runId, "to out"); toDemuxer.onPrintedErr(runId, "to err"); RunVisitor visitor = mock(RunVisitor.class); demuxer.visitRun(runId, visitor); verify(visitor).onPrintedOut(runId, TEST_FILE_1, null, "to out"); verify(visitor).onPrintedErr(runId, TEST_FILE_1, null, "to err"); }