FilesystemInstallation implements Installation { @Override public synchronized void abort() { this.running = false; FileUtils.deleteQuietly(versionFolder); } private  FilesystemInstallation(File versionFolder); static Installation create(File versionFolder, ProgressReport report); @Override synchronized void addContent(DataInVersion dataInVersion); @Override synchronized void abort(); @Override synchronized void finish(); @Override boolean isRunning();  }
@Test public void deletesFolderWhenAbortingInstallation() throws Exception { installation.abort(); assertThat(folder.getRoot().exists(), is(false)); }