### Question:
SuiteFactory implements AutoCloseable { public void start(final SuiteListener suiteListener) { FailureHandler failureHandler = new InternalErrorReportingFailureHandler(suiteListener, logOutput); Executor testExecutor = messageListener.getListenedExecutor(testThreadPool); actors = new MultiThreadedActors( actorThreadPool, new ComposedEventizerProvider( new StartableEventizer(), new RunnableEventizer(), new WorkerListenerEventizer(), new TestFileFinderListenerEventizer(), new SuiteListenerEventizer(), new RequestListenerEventizer(), new RunListenerEventizer() ), failureHandler, messageListener ); ActorThread actorThread = actors.startActorThread(); ActorRef<TestFileFinderListener> suiteRunner = actorThread.bindActor(TestFileFinderListener.class, new SuiteRunner( new DriverFactory(suiteListener, actorThread, outputCapturer, driverFinder, runIdSequence, testClassLoader), suiteListener, actorThread, testExecutor, logOutput )); suiteListener.onSuiteStarted(); actorThreadPool.execute(new TestFileFinderRunner(testFileFinder, suiteRunner)); } SuiteFactory(DaemonConfiguration daemonConfiguration, OutputCapturer outputCapturer, PrintStream logOutput, MessageListener messageListener); void configure(SuiteConfiguration suite); void start(final SuiteListener suiteListener); @Override void close(); static List<Path> getClassDirectories(SuiteConfiguration suite);  }### Answer:
@Test public void sets_the_context_class_loader_for_test_threads() throws InterruptedException { createSuiteFactory(); factory.start(new NullSuiteListener()); BlockingQueue<ClassLoader> spy = new LinkedBlockingQueue<>(); factory.testThreadPool.execute(() -> { spy.add(Thread.currentThread().getContextClassLoader()); }); ClassLoader contextClassLoader = spy.take(); assertThat(contextClassLoader, is(factory.testClassLoader)); }
@Test public void reports_uncaught_exceptions_from_actors_as_internal_errors() throws InterruptedException { createSuiteFactory(); BlockingQueue<String> spy = new LinkedBlockingQueue<>(); factory.start(new NullSuiteListener() { @Override public void onInternalError(String message, StackTrace cause) { spy.add(message); } }); ActorThread actorThread = factory.actors.startActorThread(); ActorRef<Runnable> dummyActor = actorThread.bindActor(Runnable.class, () -> { throw new RuntimeException("dummy exception"); }); dummyActor.tell().run(); assertThat(spy.take(), startsWith("Uncaught exception in thread jumi-actor-")); }