@Test
public void testGetFinishedJobResults_SameDates_SortingIsDescOnDate() throws Exception {

    //ARRANGE
    JobInstance jobInstance1 = new JobInstance(1L, EmployeeJobConfigSingleJvm.EMPLOYEE_JOB);
    when(jobExplorer.findJobInstancesByJobName(EmployeeJobConfigSingleJvm.EMPLOYEE_JOB, 0, MAX_VALUE))
            .thenReturn(asList(jobInstance1));
    DateTime dateTime = new DateTime();
    JobExecution jobInstance1_jobExecution1 = new JobExecution(jobInstance1, 1L, createJobParameters(dateTime.getYear(), dateTime.getMonthOfYear()), null);
    jobInstance1_jobExecution1.setEndTime(getDateOfDay(3));
    JobExecution jobInstance1_jobExecution2 = new JobExecution(jobInstance1, 2L, createJobParameters(dateTime.getYear(), dateTime.getMonthOfYear()), null);
    jobInstance1_jobExecution2.setEndTime(getDateOfDay(4));
    when(jobExplorer.getJobExecutions(jobInstance1)).thenReturn(asList(jobInstance1_jobExecution1, jobInstance1_jobExecution2));
    //ACT
    List<JobResult> jobResults = jobResultsService.getJobResults();
    assertThat(jobResults.get(0).getJobExecutionResults().get(0).getEndTime()).isAfter(jobResults.get(0).getJobExecutionResults().get(1).getEndTime());
}