{
Archive<JavaArchive> jarWithDefaultServiceImpl = createJarWithDefaultServiceImpl();
Archive<JavaArchive> jarThatReplaceServiceImpl = createJarThatReplaceServiceImpl();
ClassLoader emptyParent = null;
ShrinkWrapClassLoader swClassloader = new ShrinkWrapClassLoader(emptyParent, jarWithDefaultServiceImpl, jarThatReplaceServiceImpl);
ClassLoader emptyClassLoader = new ClassLoader(null){};
ClassLoader originalClassLoader = SecurityActions.getThreadContextClassLoader();
Collection<?> providers = null;
Class<?> expectedImplClass = null;
try
{
Thread.currentThread().setContextClassLoader(emptyClassLoader);
Class<?> serviceClass = swClassloader.loadClass("org.jboss.arquillian.core.impl.loadable.util.FakeService");
expectedImplClass = swClassloader.loadClass("org.jboss.arquillian.core.impl.loadable.util.ShouldBeIncluded");
providers = new JavaSPIExtensionLoader().all(swClassloader, serviceClass);
}
finally
{