public static void runCommand(Config config) throws TerseException {
        try {
            ManifestWorkspace workspace = new ManifestWorkspace(config.out);
            ClassLoader parent = ConnectPluginPath.class.getClassLoader();
            ServiceLoaderScanner serviceLoaderScanner = new ServiceLoaderScanner();
            ReflectionScanner reflectionScanner = new ReflectionScanner();
            PluginSource classpathSource = PluginUtils.classpathPluginSource(parent);
            ManifestWorkspace.SourceWorkspace<?> classpathWorkspace = workspace.forSource(classpathSource);
            PluginScanResult classpathPlugins = discoverPlugins(classpathSource, reflectionScanner, serviceLoaderScanner);
            Map<Path, Set<Row>> rowsByLocation = new LinkedHashMap<>();
            Set<Row> classpathRows = enumerateRows(classpathWorkspace, classpathPlugins);
            rowsByLocation.put(null, classpathRows);

            ClassLoaderFactory factory = new ClassLoaderFactory();
            try (DelegatingClassLoader delegatingClassLoader = factory.newDelegatingClassLoader(parent)) {
                beginCommand(config);
                for (Path pluginLocation : config.locations) {
                    PluginSource source = PluginUtils.isolatedPluginSource(pluginLocation, delegatingClassLoader, factory);
                    ManifestWorkspace.SourceWorkspace<?> pluginWorkspace = workspace.forSource(source);
                    PluginScanResult plugins = discoverPlugins(source, reflectionScanner, serviceLoaderScanner);
                    Set<Row> rows = enumerateRows(pluginWorkspace, plugins);
                    rowsByLocation.put(pluginLocation, rows);
                    for (Row row : rows) {
                        handlePlugin(config, row);
                    }
                }
                endCommand(config, workspace, rowsByLocation);
            }
        } catch (Throwable e) {
            failCommand(config, e);
        }
    }
@Test
    public void testListNoArguments() {
        CommandResult res = runCommand(
                "list"
        );
        assertNotEquals(0, res.returnCode);
    }