@Test
public void shouldKillJob() {

    OffsetDateTime now = OffsetDateTime.now(clock);
    JobInfo jobInfo = JobInfo.newJobInfo("superId", "superType", clock, HOSTNAME);
    when(jobRepository.findOne("superId")).thenReturn(Optional.of(jobInfo));
    jobService.killJob("superId");
    JobInfo expected = jobInfo.copy().setStatus(JobInfo.JobStatus.DEAD).setStopped(now).setLastUpdated(now).build();
    verify(jobMetaService).releaseRunLock("superType");
    verify(jobRepository).createOrUpdate(expected);
}