@Test public void givenRunningJobExecutionWithoutEndTime_whenGetDuration_thenReturnNull() { JobExecutionResult jobExecutionResult = new JobExecutionResult(1234567L, "STARTED", new Date(0), null, "1"); assertThat(jobExecutionResult.getDuration()).isNull(); }
public Long getDuration() { if (endTime == null) { return null; } return endTime.getTime() - startTime.getTime(); }
JobExecutionResult { public Long getDuration() { if (endTime == null) { return null; } return endTime.getTime() - startTime.getTime(); } }
JobExecutionResult { public Long getDuration() { if (endTime == null) { return null; } return endTime.getTime() - startTime.getTime(); } JobExecutionResult(Long id, String status, Date startTime, Date endTime, String description); }
JobExecutionResult { public Long getDuration() { if (endTime == null) { return null; } return endTime.getTime() - startTime.getTime(); } JobExecutionResult(Long id, String status, Date startTime, Date endTime, String description); Long getId(); String getStatus(); Date getStartTime(); Date getEndTime(); String getDescription(); Long getDuration(); }
JobExecutionResult { public Long getDuration() { if (endTime == null) { return null; } return endTime.getTime() - startTime.getTime(); } JobExecutionResult(Long id, String status, Date startTime, Date endTime, String description); Long getId(); String getStatus(); Date getStartTime(); Date getEndTime(); String getDescription(); Long getDuration();  }