DefaultUpdateSystem implements UpdateSystem { @Override public Version getInstalledVersion() { return installedDiscovery.getLatestVersion(); } DefaultUpdateSystem(VersionDiscovery installedDiscovery, VersionReceptacle receptacle,
                             VersionDiscovery availableDiscovery, VersionTransfer transfer); @Override Updater checkForUpdates(); @Override void removeOldVersions(); @Override void reportAllProgressTo(ProgressReport report); @Override File getFolderForVersionToRun(); @Override Version getInstalledVersion(); @Override void stopReportingTo(ProgressReport report);  }
@Test public void publishesCurrentlyInstalledVersion() throws Exception { installCurrentVersion(); assertThat(updateSystem.getInstalledVersion(), is(currentVersion)); }