public alluxio.grpc.JobServiceSummary toProto() throws IOException {
    alluxio.grpc.JobServiceSummary.Builder jobServiceBuilder =
          alluxio.grpc.JobServiceSummary.newBuilder();

    for (StatusSummary statusSummary : mSummaryPerStatus) {
      jobServiceBuilder.addSummaryPerStatus(statusSummary.toProto());
    }

    for (JobInfo jobInfo : mRecentActivities) {
      jobServiceBuilder.addRecentActivities(jobInfo.toProto());
    }

    for (JobInfo jobInfo : mRecentFailures) {
      jobServiceBuilder.addRecentFailures(jobInfo.toProto());
    }

    for (JobInfo jobInfo : mLongestRunning) {
      jobServiceBuilder.addLongestRunning(jobInfo.toProto());
    }

    return jobServiceBuilder.build();
  }
@Test
  public void toProto() throws Exception {
    final JobServiceSummary summary = new JobServiceSummary(mSummary.toProto());

    assertEquals(mSummary, summary);
  }