EmbeddedScanner { public void execute(Map<String, String> taskProps) { checkLauncherExists(); try (IsolatedLauncherFactory launcherFactoryToBeClosed = launcherFactory) { Map<String, String> allProps = new HashMap<>(); allProps.putAll(globalProperties); allProps.putAll(taskProps); initAnalysisProperties(allProps); doExecute(allProps); } catch (IOException e) { throw new IllegalStateException(e.getMessage(), e); } } EmbeddedScanner(IsolatedLauncherFactory bl, Logger logger, LogOutput logOutput, System2 system); static EmbeddedScanner create(String app, String version, final LogOutput logOutput, System2 system2); static EmbeddedScanner create(String app, String version, final LogOutput logOutput); Map<String, String> globalProperties(); EmbeddedScanner unmask(String fqcnPrefix); EmbeddedScanner mask(String fqcnPrefix); EmbeddedScanner addGlobalProperties(Map<String, String> p); EmbeddedScanner setGlobalProperty(String key, String value); String globalProperty(String key, @Nullable String defaultValue); String app(); String appVersion(); void start(); String serverVersion(); void execute(Map<String, String> taskProps);  }
@Test public void test_run_before_start() { expectedException.expect(IllegalStateException.class); expectedException.expectMessage("started"); scanner.execute(new HashMap<>()); }