ClassLoader applicationClassLoader = Thread.currentThread().getContextClassLoader();
ListenerBroadcast<TestResultProcessor> processors = new ListenerBroadcast<TestResultProcessor>(
TestResultProcessor.class);
processors.add(new JUnitXmlReportGenerator(testResultsDir));
processors.add(resultProcessor);
TestResultProcessor resultProcessorChain = new AttachParentTestResultProcessor(new CaptureTestOutputTestResultProcessor(processors.getSource(), outputRedirector));
JUnitTestResultProcessorAdapter listener = new JUnit4TestResultProcessorAdapter(resultProcessorChain,
timeProvider, idGenerator);
executer = new JUnitTestClassExecuter(applicationClassLoader, listener, resultProcessorChain, idGenerator, timeProvider);
}