public String getFormattedStartTimeStr(final DateFormat dateFormat) {
    String str = NA;

    if (startTime >= 0) {
      str = dateFormat.format(new Date(startTime));
    }

    return str;
  }
@Test
  public void testGetFormattedStartTimeStr() {
    JobReport jobReport = mock(JobReport.class);
    when(jobReport.getStartTime()).thenReturn(-1L);

    Job job = mock(Job.class);
    when(job.getReport()).thenReturn(jobReport);
    when(job.getName()).thenReturn("TestJobInfo");
    when(job.getState()).thenReturn(JobState.SUCCEEDED);

    JobId jobId = MRBuilderUtils.newJobId(1L, 1, 1);
    when(job.getID()).thenReturn(jobId);
    DateFormat dateFormat = new SimpleDateFormat();

    JobInfo jobInfo = new JobInfo(job);
    Assert.assertEquals(
        JobInfo.NA, jobInfo.getFormattedStartTimeStr(dateFormat));

    Date date = new Date();
    when(jobReport.getStartTime()).thenReturn(date.getTime());
    jobInfo = new JobInfo(job);
    Assert.assertEquals(
        dateFormat.format(date), jobInfo.getFormattedStartTimeStr(dateFormat));
  }