@Test public void testRun() throws Exception { ReportExecutionOptions criteria = ReportExecutionOptions.builder().build(); reportService.run(REPORT_URI, criteria); verify(mReportExecutionApi).start(REPORT_URI, criteria); verify(mReportExecutionApi).awaitStatus(EXEC_ID, REPORT_URI, 0, execution(), ready()); verify(reportService).buildExecution(REPORT_URI, EXEC_ID, criteria); }
@NotNull @Override public final ReportExecution run(@NotNull String reportUri, @NotNull ReportExecutionOptions execOptions) throws ServiceException { ReportExecutionDescriptor descriptor = mReportExecutionApi.start(reportUri, execOptions); String executionId = descriptor.getExecutionId(); mReportExecutionApi.awaitStatus(executionId, reportUri, mDelay, Status.execution(), Status.ready()); return buildExecution(reportUri, executionId, execOptions); }
AbstractReportService extends ReportService { @NotNull @Override public final ReportExecution run(@NotNull String reportUri, @NotNull ReportExecutionOptions execOptions) throws ServiceException { ReportExecutionDescriptor descriptor = mReportExecutionApi.start(reportUri, execOptions); String executionId = descriptor.getExecutionId(); mReportExecutionApi.awaitStatus(executionId, reportUri, mDelay, Status.execution(), Status.ready()); return buildExecution(reportUri, executionId, execOptions); } }
AbstractReportService extends ReportService { @NotNull @Override public final ReportExecution run(@NotNull String reportUri, @NotNull ReportExecutionOptions execOptions) throws ServiceException { ReportExecutionDescriptor descriptor = mReportExecutionApi.start(reportUri, execOptions); String executionId = descriptor.getExecutionId(); mReportExecutionApi.awaitStatus(executionId, reportUri, mDelay, Status.execution(), Status.ready()); return buildExecution(reportUri, executionId, execOptions); } protected  AbstractReportService(ExportExecutionApi exportExecutionApi,
                                    ReportExecutionApi reportExecutionApi,
                                    ExportFactory exportFactory,
                                    long delay); }
AbstractReportService extends ReportService { @NotNull @Override public final ReportExecution run(@NotNull String reportUri, @NotNull ReportExecutionOptions execOptions) throws ServiceException { ReportExecutionDescriptor descriptor = mReportExecutionApi.start(reportUri, execOptions); String executionId = descriptor.getExecutionId(); mReportExecutionApi.awaitStatus(executionId, reportUri, mDelay, Status.execution(), Status.ready()); return buildExecution(reportUri, executionId, execOptions); } protected  AbstractReportService(ExportExecutionApi exportExecutionApi,
                                    ReportExecutionApi reportExecutionApi,
                                    ExportFactory exportFactory,
                                    long delay); @NotNull @Override final ReportExecution run(@NotNull String reportUri, @NotNull ReportExecutionOptions execOptions); }
AbstractReportService extends ReportService { @NotNull @Override public final ReportExecution run(@NotNull String reportUri, @NotNull ReportExecutionOptions execOptions) throws ServiceException { ReportExecutionDescriptor descriptor = mReportExecutionApi.start(reportUri, execOptions); String executionId = descriptor.getExecutionId(); mReportExecutionApi.awaitStatus(executionId, reportUri, mDelay, Status.execution(), Status.ready()); return buildExecution(reportUri, executionId, execOptions); } protected  AbstractReportService(ExportExecutionApi exportExecutionApi,
                                    ReportExecutionApi reportExecutionApi,
                                    ExportFactory exportFactory,
                                    long delay); @NotNull @Override final ReportExecution run(@NotNull String reportUri, @NotNull ReportExecutionOptions execOptions);  }