@Test public void should_reject_null_client() throws Exception { expected.expectMessage("Client should not be null"); expected.expect(NullPointerException.class); ReportService.newService(null); }
@NotNull public static ReportService newService(@NotNull AuthorizedClient client) { Preconditions.checkNotNull(client, "Client should not be null"); InfoCacheManager cacheManager = InfoCacheManager.create(client); ServiceExceptionMapper reportMapper = ReportExceptionMapper.getInstance(); ReportServiceFactory reportServiceFactory = new ReportServiceFactory(cacheManager, client.reportExecutionApi(), client.reportExportApi(), reportMapper, client.getBaseUrl(), TimeUnit.SECONDS.toMillis(1) ); return new ProxyReportService(reportServiceFactory); }
ReportService { @NotNull public static ReportService newService(@NotNull AuthorizedClient client) { Preconditions.checkNotNull(client, "Client should not be null"); InfoCacheManager cacheManager = InfoCacheManager.create(client); ServiceExceptionMapper reportMapper = ReportExceptionMapper.getInstance(); ReportServiceFactory reportServiceFactory = new ReportServiceFactory(cacheManager, client.reportExecutionApi(), client.reportExportApi(), reportMapper, client.getBaseUrl(), TimeUnit.SECONDS.toMillis(1) ); return new ProxyReportService(reportServiceFactory); } }
ReportService { @NotNull public static ReportService newService(@NotNull AuthorizedClient client) { Preconditions.checkNotNull(client, "Client should not be null"); InfoCacheManager cacheManager = InfoCacheManager.create(client); ServiceExceptionMapper reportMapper = ReportExceptionMapper.getInstance(); ReportServiceFactory reportServiceFactory = new ReportServiceFactory(cacheManager, client.reportExecutionApi(), client.reportExportApi(), reportMapper, client.getBaseUrl(), TimeUnit.SECONDS.toMillis(1) ); return new ProxyReportService(reportServiceFactory); }  }
ReportService { @NotNull public static ReportService newService(@NotNull AuthorizedClient client) { Preconditions.checkNotNull(client, "Client should not be null"); InfoCacheManager cacheManager = InfoCacheManager.create(client); ServiceExceptionMapper reportMapper = ReportExceptionMapper.getInstance(); ReportServiceFactory reportServiceFactory = new ReportServiceFactory(cacheManager, client.reportExecutionApi(), client.reportExportApi(), reportMapper, client.getBaseUrl(), TimeUnit.SECONDS.toMillis(1) ); return new ProxyReportService(reportServiceFactory); }  @NotNull abstract ReportExecution run(@NotNull String reportUri,
                                        @Nullable ReportExecutionOptions execOptions); @NotNull static ReportService newService(@NotNull AuthorizedClient client); }
ReportService { @NotNull public static ReportService newService(@NotNull AuthorizedClient client) { Preconditions.checkNotNull(client, "Client should not be null"); InfoCacheManager cacheManager = InfoCacheManager.create(client); ServiceExceptionMapper reportMapper = ReportExceptionMapper.getInstance(); ReportServiceFactory reportServiceFactory = new ReportServiceFactory(cacheManager, client.reportExecutionApi(), client.reportExportApi(), reportMapper, client.getBaseUrl(), TimeUnit.SECONDS.toMillis(1) ); return new ProxyReportService(reportServiceFactory); }  @NotNull abstract ReportExecution run(@NotNull String reportUri,
                                        @Nullable ReportExecutionOptions execOptions); @NotNull static ReportService newService(@NotNull AuthorizedClient client);  }