@Override
    public boolean deletePluginPath(Path pluginPath) {
        FileUtils.optimisticDelete(FileUtils.findWithEnding(pluginPath, ".zip", ".ZIP", ".Zip"));
        return super.deletePluginPath(pluginPath);
    }
@Test
    public void testDeletePluginPath() {
        PluginRepository repository = new DefaultPluginRepository(pluginsPath1, pluginsPath2);

        assertTrue(Files.exists(pluginsPath1.resolve("plugin-1.zip")));
        assertTrue(repository.deletePluginPath(pluginsPath1.resolve("plugin-1")));
        assertFalse(Files.exists(pluginsPath1.resolve("plugin-1.zip")));
        assertTrue(repository.deletePluginPath(pluginsPath2.resolve("plugin-3")));
        assertFalse(repository.deletePluginPath(pluginsPath2.resolve("plugin-4")));

        List<Path> pluginPaths = repository.getPluginPaths();

        assertEquals(1, pluginPaths.size());
        assertEquals(pluginsPath2.relativize(pluginPaths.get(0)).toString(), "plugin-2");
    }