ConfigurationFileManager { public void unzipFilesFrom(final FileItem file) throws IOException { final InputStream inputStream = file.getInputStream(); try { try { rootDirectory.unzipFrom(inputStream); } catch (final InterruptedException e) { Thread.currentThread().interrupt(); } } finally { inputStream.close(); } } 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 testUnzipFileItem() throws Exception { final ConfigurationFileManager subject = getTestJenkinsConfiguration(); final FileItem file = mock(FileItem.class); when(file.getInputStream()).thenReturn(getExampleInputStream()); subject.unzipFilesFrom(file); assertTrue(new File(tempDir.getRoot(), "example.txt").exists()); }