ThreadedInstaller implements Installer { @Override public void install(final Version version) { new Thread(new Runnable() { @Override public void run() { wrapped.install(version); } }).start(); } ThreadedInstaller(Installer wrapped); static Installer PrepareInstallation(InstallationStrategy<T> strategy, ProgressReport report); @Override void install(final Version version);  }
@Test public void installsViaWrappedInstaller() throws Exception { installer.install(version); Thread.sleep(10); verify(wrappedSpy).install(version); }
@Test public void startsInstallationInNewThread() throws Exception { installer.install(version); assertThat(wrapped.finished, is(false)); }