IsolatedLauncherFactory implements Closeable { public IsolatedLauncher createLauncher(Map<String, String> props, ClassloadRules rules) { if (props.containsKey(InternalProperties.SCANNER_DUMP_TO_FILE)) { String version = props.get(InternalProperties.SCANNER_VERSION_SIMULATION); if (version == null) { version = "5.6"; } return new SimulatedLauncher(version, logger); } ServerConnection serverConnection = ServerConnection.create(props, logger); JarDownloader jarDownloader = new JarDownloaderFactory(serverConnection, logger, props.get("sonar.userHome")).create(); return createLauncher(jarDownloader, rules); } IsolatedLauncherFactory(String isolatedLauncherClassName, TempCleaning tempCleaning, Logger logger);  IsolatedLauncherFactory(Logger logger); IsolatedLauncher createLauncher(Map<String, String> props, ClassloadRules rules); @Override void close();  }
@Test public void should_use_isolated_classloader() { try { factory.createLauncher(jarDownloader, new ClassloadRules(new HashSet<String>(), new HashSet<String>())); fail(); } catch (ScannerException e) { } }