@Test
public void whenAddToFirstRunInSequenceWithoutRawTimeWithRunLackingTime()
        throws AddEntityException, EntityNotFoundException {

    Run firstRunInSequenceWithoutRawTime = mock(Run.class);
    when(firstRunInSequenceWithoutRawTime.getId()).thenReturn(TestConstants.RUN_ID);
    when(gateway.findFirstInSequenceWithoutTime(runAddRawTimePayloadEvent))
            .thenReturn(firstRunInSequenceWithoutRawTime);
    Run runWithRawTimeAssigned = mock(Run.class);
    when(gateway.save(TestConstants.RUN_ID, firstRunInSequenceWithoutRawTime)).thenReturn(runWithRawTimeAssigned);
    RunTimeAddedPayload actual = service.addTimeToFirstRunInSequenceWithoutRawTime(runAddRawTimePayload);
    verify(firstRunInSequenceWithoutRawTime).setRawTime(runAddRawTimePayloadRawTime);
    verify(gateway).save(TestConstants.RUN_ID, firstRunInSequenceWithoutRawTime);
    assertThat(actual.getOutcome()).isEqualTo(RunTimeAddedPayload.Outcome.RUN_RAWTIME_ASSIGNED_TO_EXISTING);
    assertThat(actual.getRun()).isSameAs(runWithRawTimeAssigned);
}