MethodCallSpy spy = new MethodCallSpy();
SuiteListener listener = spy.createProxyTo(SuiteListener.class);
run(listener, new FakeTestClassDriver(), CLASS_1, CLASS_2);
assertThat("should happen once", spy.countCallsTo("onSuiteFinished"), is(1));
assertThat("should happen last", spy.getLastCall(), is("onSuiteFinished"));
}
@Test
public void reports_uncaught_exceptions_from_driver_threads_as_internal_errors() {