@Test
public void shouldKillDeadJobsSince() {

    JobInfo someJobInfo = defaultJobInfo().setJobType("jobType").build();
    when(jobRepository.findRunningWithoutUpdateSince(any())).thenReturn(singletonList(someJobInfo));
    when(jobRepository.findOne(someJobInfo.getJobId())).thenReturn(Optional.of(someJobInfo));
    jobService.killJobsDeadSince(60);
    verify(jobMetaService).releaseRunLock("jobType");
}