DevPluginsProvider implements PluginsProvider { @Override public List<Path> provide(Path baseDirectory) throws PluginException { try { return Files.list(baseDirectory) .filter(f -> Files.isDirectory(f) && f.toString().endsWith("plugin")) .collect(Collectors.toList()); } catch (IOException e) { throw new PluginException(e); } }  @Override List<Path> provide(Path baseDirectory);  }
@Test public void testProvide() throws Exception { DevPluginsProvider devPluginsProvider = new DevPluginsProvider(); List<Path> pluginPaths = devPluginsProvider.provide(baseDirectory); assertThat(pluginPaths, hasSize(1)); assertThat(pluginPaths, hasItem(matchingDirectory)); }