void () { myResultsViewer.selectAndNotify(myResultsViewer.getTestsRootNode()); myEventsProcessor.onStartTesting(); myEventsProcessor.onSuiteStarted(new TestSuiteStartedEvent("suite", null)); final SMTestProxy suite = myEventsProcessor.getCurrentSuite(); myEventsProcessor.onSuiteFinished(new TestSuiteFinishedEvent("suite")); myEventsProcessor.onUncapturedOutput("preved", ProcessOutputTypes.STDOUT); myEventsProcessor.onFinishTesting(); //myResultsViewer.selectAndNotify(suite); //the string above doesn't update tree immediately so we should simulate update myConsole.getPrinter().updateOnTestSelected(suite); //Lets reset printer /clear console/ before selection changed to //get after selection event only actual ouptut myMockResettablePrinter.resetIfNecessary(); //myResultsViewer.selectAndNotify(myResultsViewer.getTestsRootNode()); //the string above doesn't update tree immediately so we should simulate update myConsole.getPrinter().updateOnTestSelected(myResultsViewer.getTestsRootNode()); assertAllOutputs(myMockResettablePrinter, "preved", "",""); }