JarDownloaderFactory { JarDownloader create() { FileCache fileCache = new FileCacheBuilder(logger) .setUserHome(userHome) .build(); BootstrapIndexDownloader bootstrapIndexDownloader = new BootstrapIndexDownloader(serverConnection, logger); ScannerFileDownloader scannerFileDownloader = new ScannerFileDownloader(serverConnection); JarExtractor jarExtractor = new JarExtractor(); return new JarDownloader(scannerFileDownloader, bootstrapIndexDownloader, fileCache, jarExtractor, logger); } JarDownloaderFactory(ServerConnection conn, Logger logger, @Nullable String userHome);   }
@Test public void should_create() { ServerConnection conn = mock(ServerConnection.class); Logger logger = mock(Logger.class); String userHome = "userhome"; assertThat(new JarDownloaderFactory(conn, logger, userHome).create()).isNotNull(); }