EpisodeDownloader { public void download(Episode episode) { fileDownloadManager.enqueue( parse(episode.getAudioUrl()), episodeFile.getPodcastsDirectory(), episode.getAudioFilePath() ); } @Inject  EpisodeDownloader(FileDownloadManager fileDownloadManager, EpisodeFile episodeFile); void download(Episode episode); boolean isAlreadyDownloaded(Episode episode);  }
@Test public void itDelegatesToFileDownloadManagaerWhenAskForDownload() { episodeDownloader.download(episode); verify(fileDownloadManagerMock).enqueue( parse(episode.getAudioUrl()), episodeFileMock.getPodcastsDirectory(), episode.getAudioFilePath() ); }