HttpInstaller implements InstallationStrategy<String> { @Override public void installElement(String file, Version version) throws IOException { report.installingFile(file); URL fileUrl = new URL(baseUrl, version.asString() + "/" + file); DataImport dataImport = new DataImport().reportProgressTo(report); UrlDataInVersion dataInVersion = new UrlDataInVersion(fileUrl, file, dataImport); installation.addContent(dataInVersion); } HttpInstaller(ProgressReport report, URL baseUrl, Installation installation); @Override List<String> findAllElementsToInstall(Version version); @Override void installElement(String file, Version version); @Override void handleException(); @Override void finalizeInstallation();  }
@Test public void reportsInstallation() throws Exception { httpInstaller.installElement("name", version); verify(report).installingFile("name"); }