@Test
public void testRescheduleMultipleSubmittedJobs() {

    Long jobTimeoutTime = 1L;
    jobSupervisor = new JobSupervisor(jobDAOProvider, jobTimeoutTime);
    List<Long> jobIDs = Arrays.asList(1L, 3L);
    when(jobDaoMock.getAllJobIds(JobStatus.SUBMITTED)).thenReturn(jobIDs.iterator());
    jobSupervisor.rescheduleLeftOverJobs();
    verify(jobDaoMock).getAllJobIds(JobStatus.SUBMITTED);
    verify(jobDaoMock).rescheduleJob(jobIDs.get(0));
    verify(jobDaoMock).rescheduleJob(jobIDs.get(1));
    verifyNoMoreInteractions(jobDaoMock);
}