public SurefireProvider createProvider( boolean isInsideFork )
{
final Thread currentThread = Thread.currentThread();
final ClassLoader systemClassLoader = currentThread.getContextClassLoader();
currentThread.setContextClassLoader( classLoader );
Object o = surefireReflector.createBooterConfiguration( classLoader, reporterManagerFactory, isInsideFork );
surefireReflector.setTestSuiteDefinitionAware( o, providerConfiguration.getTestSuiteDefinition() );
surefireReflector.setProviderPropertiesAware( o, providerConfiguration.getProviderProperties() );
surefireReflector.setReporterConfigurationAware( o, providerConfiguration.getReporterConfiguration() );
surefireReflector.setTestClassLoaderAware( o, classLoader );
surefireReflector.setTestArtifactInfoAware( o, providerConfiguration.getTestArtifact() );
surefireReflector.setRunOrderParameters( o, providerConfiguration.getRunOrderParameters() );
surefireReflector.setIfDirScannerAware( o, providerConfiguration.getDirScannerParams() );
surefireReflector.setMainCliOptions( o, providerConfiguration.getMainCliOptions() );
surefireReflector.setSkipAfterFailureCount( o, providerConfiguration.getSkipAfterFailureCount() );
surefireReflector.setShutdown( o, providerConfiguration.getShutdown() );
if ( isInsideFork )
{
surefireReflector.setSystemExitTimeout( o, providerConfiguration.getSystemExitTimeout() );
}
Object provider = surefireReflector.instantiateProvider( startupConfiguration.getActualClassName(), o );
currentThread.setContextClassLoader( systemClassLoader );
return new ProviderProxy( provider, classLoader );
}