void () { myEventsProcessor.onError("error msg:root", "method1:1\nmethod2:2", true); myEventsProcessor.onSuiteStarted(new TestSuiteStartedEvent("suite", null)); final SMTestProxy suite = myEventsProcessor.getCurrentSuite(); suite.setPrinter(myMockResettablePrinter); myEventsProcessor.onError("error msg:suite", "method1:1\nmethod2:2", true); assertAllOutputs(myMockResettablePrinter, "", """ error msg:suite method1:1 method2:2 """, ""); final MockPrinter mockSuitePrinter = new MockPrinter(); mockSuitePrinter.onNewAvailable(suite); assertAllOutputs(mockSuitePrinter, "", """ error msg:suite method1:1 method2:2 """, ""); final MockPrinter mockRootSuitePrinter = new MockPrinter(); mockRootSuitePrinter.onNewAvailable(myRootSuite); assertAllOutputs(mockRootSuitePrinter, "", """ error msg:root method1:1 method2:2 error msg:suite method1:1 method2:2 """, ""); }