public void runsInstallationInASeparateThread() throws Exception {
addVersion("4.2.1");
addContentToVersion("4.2.1", "content");
NumericVersion version = new NumericVersion(4, 2, 1);
CountDownLatch latch = new CountDownLatch(1);
Installation installation = new SlowInstallation(new NullInstallation(), latch);
when(store.beginInstallation(version)).thenReturn(installation);
FilesystemRepository repository = new FilesystemRepository(folder.getRoot());
ProgressReport report = mock(ProgressReport.class);
repository.reportAllProgressTo(report);
repository.transferVersionTo(version, store);