ReadOnlySchedulerImpl implements ReadOnlyScheduler.Iface { @Override public Response getTasksStatus(TaskQuery query) { return ok(Result.scheduleStatusResult( new ScheduleStatusResult().setTasks(getTasks(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 testGetTasksStatus() throws Exception { Builder query = Query.unscoped(); Iterable<IScheduledTask> tasks = makeDefaultScheduledTasks(10); storageUtil.expectTaskFetch(query, ImmutableSet.copyOf(tasks)); control.replay(); ImmutableList<ScheduledTask> expected = IScheduledTask.toBuildersList(tasks); Response response = assertOkResponse(thrift.getTasksStatus(new TaskQuery())); assertEquals(expected, response.getResult().getScheduleStatusResult().getTasks()); }