@Test
public void whenAddRunWithEventManyPriorRunsItShouldSetSequence() throws AddEntityException {

    Run lastInSequenceForEvent = mock(Run.class);
    when(gateway.findLastInSequenceForEvent(addPayloadEvent)).thenReturn(lastInSequenceForEvent);
    when(lastInSequenceForEvent.getSequence()).thenReturn(600);
    when(gateway.add(addPayload)).thenReturn(addedRun);
    Run actual = service.add(addPayload);
    verify(addPayload).setSequence(601);
    verify(gateway).add(addPayload);
    assertThat(actual).isSameAs(addedRun);
}