void () { //send tree myEventsProcessor.onSuiteTreeStarted("suite1", null, null, "suite1", "0"); myEventsProcessor.onSuiteTreeNodeAdded("test1", null, null,"test1", "suite1"); myEventsProcessor.onSuiteTreeEnded("suite1"); myEventsProcessor.onBuildTreeEnded(); //start testing myEventsProcessor.onStartTesting(); //invocation count for method set to 2 for(int i = 0; i < 2; i++) { myEventsProcessor.onSuiteStarted(new TestSuiteStartedEvent("suite1", null)); myEventsProcessor.onTestStarted(new TestStartedEvent("test1", null)); myResultsViewer.performUpdate(); myEventsProcessor.onTestFailure(new TestFailedEvent("test1", "", "", false, "a", "b")); myResultsViewer.performUpdate(); myEventsProcessor.onTestFinished(new TestFinishedEvent("test1", 10L)); myResultsViewer.performUpdate(); myEventsProcessor.onSuiteFinished(new TestSuiteFinishedEvent("suite1")); myResultsViewer.performUpdate(); } myEventsProcessor.onFinishTesting(); myResultsViewer.performUpdate(); //ensure 2 nodes found assertEquals(2, myResultsViewer.getFailedTestCount()); }