DefaultUpdateSystem implements UpdateSystem { @Override public File getFolderForVersionToRun() { return receptacle.getFolderForVersionToRun(); } 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 findsFolderForLatestVersionViaStore() throws Exception { File value = new File("."); when(versionStore.getFolderForVersionToRun()).thenReturn(value); assertThat(updateSystem.getFolderForVersionToRun(), is(value)); }