void () { final SMTestProxy myTest1 = startTestWithPrinter("my_test"); myEventsProcessor.onTestFailure(new TestFailedEvent("my_test", "error msg", "\n\n", false, null, null)); myEventsProcessor.onTestOutput(new TestOutputEvent("my_test", "stdout1 ", true)); myEventsProcessor.onTestOutput(new TestOutputEvent("my_test", "stderr1 ", false)); assertAllOutputs(myMockResettablePrinter, "stdout1 ", "\nerror msg\nstderr1 ", ""); final MockPrinter mockPrinter1 = new MockPrinter(); mockPrinter1.onNewAvailable(myTest1); assertAllOutputs(mockPrinter1, "stdout1 ", "stderr1 \nerror msg\n", ""); }