FileInstaller implements InstallationStrategy<File> { @Override public void installElement(File file, Version version) throws IOException { report.installingFile(file.getName()); DataImport dataImport = new DataImport().reportProgressTo(report); FileDataInVersion dataInVersion = new FileDataInVersion(file, dataImport); installation.addContent(dataInVersion); } FileInstaller(ProgressReport report, File availableVersions, Installation installation); @Override List<File> findAllElementsToInstall(Version version); @Override void installElement(File file, Version version); @Override void handleException(); @Override void finalizeInstallation();  }
@Test public void reportsInstallation() throws Exception { File element = folder.newFile(); fileInstaller.installElement(element, version); verify(report).installingFile(element.getName()); }