@Test public void testRun() throws ReportProcessingException { final ReportDownloadResponse mockReportDownloadResponse = mock(ReportDownloadResponse.class); when(mockReportDownloadResponse.getInputStream()).thenReturn(null); callableReportDownloader = new CallableReportDownloader(adWordsSession, reportDefinition) { @Override File handleReportStreamResult(InputStream reportStream) throws ReportProcessingException { return new File(""); } @Override ReportDownloadResponse getReportDownloadResponse() { return mockReportDownloadResponse; } }; callableReportDownloader.call(); verify(mockReportDownloadResponse, times(1)).getInputStream(); }
@Override public File call() throws ReportProcessingException { ReportDownloadResponse reportDownloadResponse = getReportDownloadResponse(); InputStream inputStream = reportDownloadResponse.getInputStream(); return handleReportStreamResult(inputStream); }
CallableReportDownloader implements Callable<File> { @Override public File call() throws ReportProcessingException { ReportDownloadResponse reportDownloadResponse = getReportDownloadResponse(); InputStream inputStream = reportDownloadResponse.getInputStream(); return handleReportStreamResult(inputStream); } }
CallableReportDownloader implements Callable<File> { @Override public File call() throws ReportProcessingException { ReportDownloadResponse reportDownloadResponse = getReportDownloadResponse(); InputStream inputStream = reportDownloadResponse.getInputStream(); return handleReportStreamResult(inputStream); } CallableReportDownloader(
      ImmutableAdWordsSession session, ReportDefinition reportDefinition); }
CallableReportDownloader implements Callable<File> { @Override public File call() throws ReportProcessingException { ReportDownloadResponse reportDownloadResponse = getReportDownloadResponse(); InputStream inputStream = reportDownloadResponse.getInputStream(); return handleReportStreamResult(inputStream); } CallableReportDownloader(
      ImmutableAdWordsSession session, ReportDefinition reportDefinition); @Override File call(); }
CallableReportDownloader implements Callable<File> { @Override public File call() throws ReportProcessingException { ReportDownloadResponse reportDownloadResponse = getReportDownloadResponse(); InputStream inputStream = reportDownloadResponse.getInputStream(); return handleReportStreamResult(inputStream); } CallableReportDownloader(
      ImmutableAdWordsSession session, ReportDefinition reportDefinition); @Override File call();  }