FileDownloadManager { public long enqueue(Uri uri, String directory, String filePath) { DownloadManager.Request request = new DownloadManager.Request(uri); request.setDestinationInExternalPublicDir(directory, filePath); return downloadManager.enqueue(request); } @Inject  FileDownloadManager(DownloadManager downloadManager); long enqueue(Uri uri, String directory, String filePath);  }
@Test public void itDelegatesToDownloadManageEnqueueRequest() { FileDownloadManager fileDownloadManager = new FileDownloadManager(downloadManagerMock); Uri uri = Uri.parse("http: String directory = Environment.DIRECTORY_DOWNLOADS; String filePath = "download.html"; fileDownloadManager.enqueue(uri, directory, filePath); verify(downloadManagerMock).enqueue(any(DownloadManager.Request.class)); }