@Test
public void shouldPersistDeadEvent() throws Exception {

    JobDefinition mockDefinition = mock(JobDefinition.class);
    when(mockDefinition.jobType()).thenReturn(JOB_TYPE);
    when(jobRunnableMock.getJobDefinition()).thenReturn(mockDefinition);
    subject.consumeStateChange(stateChangedEvent(DEAD));
    verify(jobServiceMock).killJob(JOB_ID);
}