ReadOnlySchedulerImpl implements ReadOnlyScheduler.Iface { @Override public Response getJobUpdateSummaries(JobUpdateQuery mutableQuery) { IJobUpdateQuery query = IJobUpdateQuery.build(requireNonNull(mutableQuery)); return ok(Result.getJobUpdateSummariesResult( new GetJobUpdateSummariesResult() .setUpdateSummaries(IJobUpdateSummary.toBuildersList(storage.read( storeProvider -> storeProvider.getJobUpdateStore().fetchJobUpdateSummaries(query)))))); } @Inject  ReadOnlySchedulerImpl(
      ConfigurationManager configurationManager,
      Storage storage,
      NearestFit nearestFit,
      CronPredictor cronPredictor,
      QuotaManager quotaManager); @Override Response populateJobConfig(JobConfiguration description); @Override Response getTasksStatus(TaskQuery query); @Override Response getTasksWithoutConfigs(TaskQuery query); @Override Response getPendingReason(TaskQuery query); @Override Response getConfigSummary(JobKey job); @Override Response getRoleSummary(); @Override Response getJobSummary(@Nullable String maybeNullRole); @Override Response getJobs(@Nullable String maybeNullRole); @Override Response getQuota(String ownerRole); @Override Response getJobUpdateSummaries(JobUpdateQuery mutableQuery); @Override Response getJobUpdateDetails(JobUpdateKey mutableKey); @Override Response getJobUpdateDiff(JobUpdateRequest mutableRequest);  }
@Test public void testGetJobUpdateSummaries() throws Exception { JobUpdateQuery query = new JobUpdateQuery().setRole(ROLE); List<JobUpdateSummary> summaries = createJobUpdateSummaries(5); expect(storageUtil.jobUpdateStore.fetchJobUpdateSummaries(IJobUpdateQuery.build(query))) .andReturn(IJobUpdateSummary.listFromBuilders(summaries)); control.replay(); Response response = assertOkResponse(thrift.getJobUpdateSummaries(query)); assertEquals( summaries, response.getResult().getGetJobUpdateSummariesResult().getUpdateSummaries()); }