@Test
public void testGetFinishedJobResults_DifferentDates_SortingIsDescOnYearAndMonth() throws Exception {

    //ARRANGE
    JobInstance jobInstance1 = new JobInstance(1L, EmployeeJobConfigSingleJvm.EMPLOYEE_JOB);
    JobInstance jobInstance2 = new JobInstance(2L, EmployeeJobConfigSingleJvm.EMPLOYEE_JOB);
    List<JobInstance> jobInstances = asList(jobInstance1, jobInstance2);
    when(jobExplorer.findJobInstancesByJobName(EmployeeJobConfigSingleJvm.EMPLOYEE_JOB, 0, MAX_VALUE))
            .thenReturn(jobInstances);
    JobExecution jobInstance1_jobExecution1 = createJobExecution(jobInstance1, createJobParameters(2014, 5));
    when(jobExplorer.getJobExecutions(jobInstance1)).thenReturn(asList(jobInstance1_jobExecution1));
    JobExecution jobInstance2_jobExecution1 = createJobExecution(jobInstance2, createJobParameters(2013, 6));
    JobExecution jobInstance2_jobExecution2 = createJobExecution(jobInstance2, createJobParameters(2013, 6));
    when(jobExplorer.getJobExecutions(jobInstance2)).thenReturn(asList(jobInstance2_jobExecution1, jobInstance2_jobExecution2));
    //ACT
    List<JobResult> jobResults = jobResultsService.getJobResults();
    //ASSERT
    verify(jobExplorer).findJobInstancesByJobName(EmployeeJobConfigSingleJvm.EMPLOYEE_JOB, 0, MAX_VALUE);
    verify(jobExplorer).getJobExecutions(jobInstance1);
    verify(jobExplorer).getJobExecutions(jobInstance2);
    assertThat(jobResults).hasSize(6);
}