ConfigurationFileManager { public void deleteFile(final String path) throws IOException { try { new FilePath(rootDirectory, path).deleteRecursive(); } catch (final InterruptedException e) { Thread.currentThread().interrupt(); } } ConfigurationFileManager();   ConfigurationFileManager(final ConfigurationProvider configurationProvider, final File rootDirectory); void initConfiguration(); void restoreConfiguration(); void unzipFilesFrom(final FileItem file); void deleteFile(final String path); void saveConfiguration(final String includes, final String excludes); InputStream downloadStoredConfiguration(); File getRootDirectory();  }
@Test public void testDeleteFile() throws Exception { final ConfigurationFileManager subject = getTestJenkinsConfiguration(); final File file = tempDir.newFile("aFile"); subject.deleteFile(file.getName()); assertFalse(file.exists()); }
@Test public void testDeleteDirectoryWithContents() throws Exception { final ConfigurationFileManager subject = getTestJenkinsConfiguration(); final File directory = tempDir.newFolder("directory"); new File(directory, "file").createNewFile(); subject.deleteFile(directory.getName()); assertFalse(directory.exists()); }