void () { final SMTestProxy myTest1 = startTestWithPrinter("my_test"); myEventsProcessor.onTestIgnored(new TestIgnoredEvent("my_test", "ignored msg", null)); myEventsProcessor.onTestOutput(new TestOutputEvent("my_test", "stdout1 ", true)); myEventsProcessor.onTestOutput(new TestOutputEvent("my_test", "stderr1 ", false)); assertAllOutputs(myMockResettablePrinter, "stdout1 ", "stderr1 ", "\nignored msg\n"); final MockPrinter mockPrinter1 = new MockPrinter(); mockPrinter1.onNewAvailable(myTest1); assertAllOutputs(mockPrinter1, "stdout1 ", "stderr1 ", "\nignored msg\n"); //other output order final SMTestProxy myTest2 = startTestWithPrinter("my_test2"); myEventsProcessor.onTestOutput(new TestOutputEvent("my_test2", "stdout1 ", true)); myEventsProcessor.onTestOutput(new TestOutputEvent("my_test2", "stderr1 ", false)); myEventsProcessor.onTestIgnored(new TestIgnoredEvent("my_test2", "ignored msg", null)); assertAllOutputs(myMockResettablePrinter, "stdout1 ", "stderr1 ", "\nignored msg\n"); final MockPrinter mockPrinter2 = new MockPrinter(); mockPrinter2.onNewAvailable(myTest2); assertAllOutputs(mockPrinter2, "stdout1 ", "stderr1 ", "\nignored msg\n"); }