ReadOnlySchedulerImpl implements ReadOnlyScheduler.Iface { @Override public Response getTasksWithoutConfigs(TaskQuery query) { List<ScheduledTask> tasks = Lists.transform( getTasks(query), task -> { task.getAssignedTask().getTask().unsetExecutorConfig(); return task; }); return ok(Result.scheduleStatusResult(new ScheduleStatusResult().setTasks(tasks))); } @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 testGetTasksWithoutConfigs() throws Exception { Builder query = Query.unscoped(); storageUtil.expectTaskFetch(query, ImmutableSet.copyOf(makeDefaultScheduledTasks(10))); control.replay(); ImmutableList<ScheduledTask> expected = IScheduledTask.toBuildersList(makeDefaultScheduledTasks( 10, defaultTask(true).setExecutorConfig(null))); Response response = assertOkResponse(thrift.getTasksWithoutConfigs(new TaskQuery())); assertEquals(expected, response.getResult().getScheduleStatusResult().getTasks()); }