@Test public void testHandleSuccessfulResponse() throws Exception { String responseBody = "Successful,report,response"; RawReportDownloadResponse rawResponse = new RawReportDownloadResponse( 200, ByteSource.wrap(responseBody.getBytes(REPORT_CHARSET)).openStream(), REPORT_CHARSET, "CSV"); ReportDownloadResponse reportResponse = helper.handleResponse(rawResponse, exceptionBuilder); String actualResponseBody = new String(ByteStreams.toByteArray(reportResponse.getInputStream()), REPORT_CHARSET); assertEquals("Response body not expected value", responseBody, actualResponseBody); }
@Override public ReportDownloadResponse handleResponse( RawReportDownloadResponse rawResponse, Builder exceptionBuilder) throws ReportDownloadResponseException { return impl.handleResponse(rawResponse, exceptionBuilder); }
AdHocReportDownloadHelper implements AdHocReportDownloadHelperInterface { @Override public ReportDownloadResponse handleResponse( RawReportDownloadResponse rawResponse, Builder exceptionBuilder) throws ReportDownloadResponseException { return impl.handleResponse(rawResponse, exceptionBuilder); } }
AdHocReportDownloadHelper implements AdHocReportDownloadHelperInterface { @Override public ReportDownloadResponse handleResponse( RawReportDownloadResponse rawResponse, Builder exceptionBuilder) throws ReportDownloadResponseException { return impl.handleResponse(rawResponse, exceptionBuilder); } @Inject  AdHocReportDownloadHelper(
      AdHocReportDownloadHelperImpl helperImpl, AdsUtilityRegistry adsUtilityRegistry); }
AdHocReportDownloadHelper implements AdHocReportDownloadHelperInterface { @Override public ReportDownloadResponse handleResponse( RawReportDownloadResponse rawResponse, Builder exceptionBuilder) throws ReportDownloadResponseException { return impl.handleResponse(rawResponse, exceptionBuilder); } @Inject  AdHocReportDownloadHelper(
      AdHocReportDownloadHelperImpl helperImpl, AdsUtilityRegistry adsUtilityRegistry); @Override ReportDownloadResponse downloadReport(
      ReportRequest reportRequest, Builder exceptionBuilder); @Override RawReportDownloadResponse downloadReport(ReportRequest reportRequest); @Override ReportDownloadResponse handleResponse(
      RawReportDownloadResponse rawResponse, Builder exceptionBuilder); @Override int getReportDownloadTimeout(); @Override void setReportDownloadTimeout(int reportDownloadTimeout); }
AdHocReportDownloadHelper implements AdHocReportDownloadHelperInterface { @Override public ReportDownloadResponse handleResponse( RawReportDownloadResponse rawResponse, Builder exceptionBuilder) throws ReportDownloadResponseException { return impl.handleResponse(rawResponse, exceptionBuilder); } @Inject  AdHocReportDownloadHelper(
      AdHocReportDownloadHelperImpl helperImpl, AdsUtilityRegistry adsUtilityRegistry); @Override ReportDownloadResponse downloadReport(
      ReportRequest reportRequest, Builder exceptionBuilder); @Override RawReportDownloadResponse downloadReport(ReportRequest reportRequest); @Override ReportDownloadResponse handleResponse(
      RawReportDownloadResponse rawResponse, Builder exceptionBuilder); @Override int getReportDownloadTimeout(); @Override void setReportDownloadTimeout(int reportDownloadTimeout);  }