@Test public void assertGetAllJobsBriefInfoWithoutNamespace() { when(regCenter.getChildrenKeys("/")).thenReturn(Arrays.asList("test_job_1", "test_job_2")); assertThat(jobStatisticsAPI.getAllJobsBriefInfo().size(), is(0)); }
@Override public Collection<JobBriefInfo> getAllJobsBriefInfo() { List<String> jobNames = regCenter.getChildrenKeys("/"); List<JobBriefInfo> result = new ArrayList<>(jobNames.size()); for (String each : jobNames) { JobBriefInfo jobBriefInfo = getJobBriefInfo(each); if (null != jobBriefInfo) { result.add(jobBriefInfo); } } Collections.sort(result); return result; }
JobStatisticsAPIImpl implements JobStatisticsAPI { @Override public Collection<JobBriefInfo> getAllJobsBriefInfo() { List<String> jobNames = regCenter.getChildrenKeys("/"); List<JobBriefInfo> result = new ArrayList<>(jobNames.size()); for (String each : jobNames) { JobBriefInfo jobBriefInfo = getJobBriefInfo(each); if (null != jobBriefInfo) { result.add(jobBriefInfo); } } Collections.sort(result); return result; } }
JobStatisticsAPIImpl implements JobStatisticsAPI { @Override public Collection<JobBriefInfo> getAllJobsBriefInfo() { List<String> jobNames = regCenter.getChildrenKeys("/"); List<JobBriefInfo> result = new ArrayList<>(jobNames.size()); for (String each : jobNames) { JobBriefInfo jobBriefInfo = getJobBriefInfo(each); if (null != jobBriefInfo) { result.add(jobBriefInfo); } } Collections.sort(result); return result; }  }
JobStatisticsAPIImpl implements JobStatisticsAPI { @Override public Collection<JobBriefInfo> getAllJobsBriefInfo() { List<String> jobNames = regCenter.getChildrenKeys("/"); List<JobBriefInfo> result = new ArrayList<>(jobNames.size()); for (String each : jobNames) { JobBriefInfo jobBriefInfo = getJobBriefInfo(each); if (null != jobBriefInfo) { result.add(jobBriefInfo); } } Collections.sort(result); return result; }  @Override int getJobsTotalCount(); @Override Collection<JobBriefInfo> getAllJobsBriefInfo(); @Override JobBriefInfo getJobBriefInfo(final String jobName); @Override Collection<JobBriefInfo> getJobsBriefInfo(final String ip); }
JobStatisticsAPIImpl implements JobStatisticsAPI { @Override public Collection<JobBriefInfo> getAllJobsBriefInfo() { List<String> jobNames = regCenter.getChildrenKeys("/"); List<JobBriefInfo> result = new ArrayList<>(jobNames.size()); for (String each : jobNames) { JobBriefInfo jobBriefInfo = getJobBriefInfo(each); if (null != jobBriefInfo) { result.add(jobBriefInfo); } } Collections.sort(result); return result; }  @Override int getJobsTotalCount(); @Override Collection<JobBriefInfo> getAllJobsBriefInfo(); @Override JobBriefInfo getJobBriefInfo(final String jobName); @Override Collection<JobBriefInfo> getJobsBriefInfo(final String ip);  }