void () { final SMTestProxy myTest1 = startTestWithPrinter("my_test"); myEventsProcessor.onTestFailure(new TestFailedEvent("my_test", "error msg", "method1:1\nmethod2:2", false, "actual", "expected")); myEventsProcessor.onTestOutput(new TestOutputEvent("my_test", "stdout1 ", true)); myEventsProcessor.onTestOutput(new TestOutputEvent("my_test", "stderr1 ", false)); assertAllOutputs(myMockResettablePrinter, // std out "stdout1 ", // std err """ error msg expected actual method1:1 method2:2 stderr1\s""", // std sys "Expected :Actual :"); final MockPrinter mockPrinter1 = new MockPrinter(); mockPrinter1.onNewAvailable(myTest1); assertAllOutputs(mockPrinter1, // std out "stdout1 ", // std err """ stderr1\s error msg expected actual method1:1 method2:2 """, // std sys "Expected :Actual :"); }