@Test
public void shouldPersistFailedEvent() throws Exception {

    final StateChangeEvent event = stateChangedEvent(FAILED);
    subject.consumeStateChange(event);
    final OffsetDateTime ts = ofInstant(ofEpochMilli(event.getTimestamp()), systemDefault());
    verify(jobServiceMock).appendMessage(JOB_ID, jobMessage(ERROR, "", ts));
}