FixedVersionStore implements VersionStore { @Override public Installation beginInstallation(Version version) { return wrapped.beginInstallation(version); } FixedVersionStore(File rootFolder, VersionStore wrapped); @Override Installation beginInstallation(Version version); @Override void removeOldVersions(); @Override Version getLatestVersion(); @Override File getFolderForVersionToRun(); @Override void reportAllProgressTo(ProgressReport report);  }
@Test public void forwardsAdditionToWrappedStore() throws Exception { Installation installation = mock(Installation.class); when(wrapped.beginInstallation(version)).thenReturn(installation); Installation actualInstallation = store.beginInstallation(version); assertThat(actualInstallation, is(installation)); }