@Test public void constructsLocalPathForTaskFromSourceUrl() throws Exception { when(downloadFolder.makePathForUrl(SOURCE_URL)).thenReturn(LOCAL_PATH); downloader.startDownloading(request); assertEquals(request.localPath, LOCAL_PATH); }
@Test public void ensuresDownloadFolderExists() throws Exception { downloader.startDownloading(request); verify(downloadFolder).mkdirs(); }
@Test public void submitsTaskToDownloader() throws Exception { downloader.startDownloading(request); verify(downloadManager).submit(request); }