### Question:
ReportDownloader { public URL getDownloadUrl(ReportDownloadOptions options) throws RemoteException, MalformedURLException { ReportJobStatus status = reportService.getReportJobStatus(reportJobId); Preconditions.checkState( status == ReportJobStatus.COMPLETED, "Report " + reportJobId + " must be completed before downloading. It is currently: " + status); return new URL(reportService.getReportDownloadUrlWithOptions(reportJobId, options)); } ReportDownloader(ReportServiceInterface reportService, long reportJobId); @VisibleForTesting  ReportDownloader(ReportServiceInterface reportService, long reportJobId, Sleeper sleeper); Thread whenReportReady(final ReportCallback callback); boolean waitForReportReady(); URL getDownloadUrl(ReportDownloadOptions options); CharSource getReportAsCharSource(ReportDownloadOptions options); static final Charset REPORT_CHARSET; static final int SLEEP_TIMER; }### Answer:
@Test public void testGetReportDownloadUrlWithOptions() throws ApiException, RemoteException, MalformedURLException { ReportDownloader downloader = new ReportDownloader(reportService, 1); when(reportService.getReportJobStatus(Matchers.anyLong())) .thenReturn(ReportJobStatus.COMPLETED); when(reportService.getReportDownloadUrlWithOptions( Matchers.anyLong(), Matchers.any(ReportDownloadOptions.class))) .thenReturn("https: URL downloadUrl = downloader.getDownloadUrl(new ReportDownloadOptions()); assertEquals("https: }