@Test public void testJobServiceSummaryBuilder() { Collection<StatusSummary> summaryPerStatus = mSummary.getSummaryPerStatus(); assertEquals("Unexpected length of summaryPerStatus", Status.values().length, summaryPerStatus.size()); Map<Status, Long> groupByStatus = Maps.newHashMap(); for (StatusSummary statusSummary : summaryPerStatus) { groupByStatus.put(statusSummary.getStatus(), statusSummary.getCount()); } assertEquals("Unexpected length after grouping by status, " + "perhaps there were duplicate status in StatusSummary", Status.values().length, summaryPerStatus.size()); for (Status status : groupByStatus.keySet()) { long count = groupByStatus.get(status); switch (status) { case COMPLETED: assertEquals("COMPLETED count unexpected", 2L, count); break; case FAILED: assertEquals("FAILED count unexpected", 3L, count); break; case RUNNING: assertEquals("RUNNING count unexpected", 2L, count); break; default: assertEquals("Unexpected status having count value: " + status, 0L, count); } } }
public Collection<StatusSummary> getSummaryPerStatus() { return Collections.unmodifiableCollection(mSummaryPerStatus); }
JobServiceSummary { public Collection<StatusSummary> getSummaryPerStatus() { return Collections.unmodifiableCollection(mSummaryPerStatus); } }
JobServiceSummary { public Collection<StatusSummary> getSummaryPerStatus() { return Collections.unmodifiableCollection(mSummaryPerStatus); } JobServiceSummary(List<JobInfo> jobInfos);  JobServiceSummary(alluxio.grpc.JobServiceSummary jobServiceSummary); }
JobServiceSummary { public Collection<StatusSummary> getSummaryPerStatus() { return Collections.unmodifiableCollection(mSummaryPerStatus); } JobServiceSummary(List<JobInfo> jobInfos);  JobServiceSummary(alluxio.grpc.JobServiceSummary jobServiceSummary); Collection<StatusSummary> getSummaryPerStatus(); List<JobInfo> getRecentActivities(); List<JobInfo> getRecentFailures(); List<JobInfo> getLongestRunning(); alluxio.grpc.JobServiceSummary toProto(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
JobServiceSummary { public Collection<StatusSummary> getSummaryPerStatus() { return Collections.unmodifiableCollection(mSummaryPerStatus); } JobServiceSummary(List<JobInfo> jobInfos);  JobServiceSummary(alluxio.grpc.JobServiceSummary jobServiceSummary); Collection<StatusSummary> getSummaryPerStatus(); List<JobInfo> getRecentActivities(); List<JobInfo> getRecentFailures(); List<JobInfo> getLongestRunning(); alluxio.grpc.JobServiceSummary toProto(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final int RECENT_LENGTH; }