PluginLoader { public static PluginLoader withPluginDirectory(Path pluginsDirectory) throws PluginException { if (pluginsDirectory == null) { throw new PluginException("Plugins directory can't be null"); } return new PluginLoader(pluginsDirectory); } private  PluginLoader(Path pluginsDirectory); static PluginLoader withPluginDirectory(Path pluginsDirectory); PluginLoader withFileGlob(String fileGlob); PluginLoader withPluginsProvider(PluginsProvider pluginsProvider); PluginLoader withCacheDirectory(Path cacheDirectory); PluginLoader withExtensionPoints(Class... extensionPoints); PluginLoader withManifestReader(ManifestReader manifestReader); PluginLoader withDependencyChecker(DependencyChecker dependencyChecker); PluginLoader withClassesScanner(ClassesScanner classesScanner); PluginLoader withResourcesScanner(ResourcesScanner resourcesScanner); PluginLoader withResourcesPatterns(String... resourcesPatterns); Path getPluginsDirectory(); String getFileGlob(); PluginsProvider getPluginsProvider(); Path getCacheDirectory(); ManifestReader getManifestReader(); DependencyChecker getDependencyChecker(); ClassesScanner getClassesScanner(); ResourcesScanner getResourcesScanner(); String[] getResourcesPatterns(); List<Class> getExtensionPoints(); PluginRegistry load(); static final String DEFAULT_CACHE_DIRECTORY; }
@Test(expected = PluginException.class) public void testIncorrectFileProvider() throws PluginException { PluginLoader.withPluginDirectory(null); }