@Test
public void testPredictedSpeedWhenFirstEventThenStarted() throws Exception {

    TagId tag = new TagId("DCBA");
    Snapshot snapshot = new Snapshot(Instant.EPOCH);
    AddTagEvent addTagEvent = new AddTagEvent(Instant.EPOCH, tag, 3);
    snapshot = addTagEvent.doApply(snapshot);
    TagSeenEvent tagSeenEvent =
            new TagSeenEvent(Instant.EPOCH.minus(10, ChronoUnit.SECONDS), tag, 0, 0L);
    snapshot = tagSeenEvent.doApply(snapshot);
    StartEvent startEvent = new StartEvent(Instant.EPOCH);
    snapshot = startEvent.doApply(snapshot);
    TagSeenEvent tagSeenEvent2 =
            new TagSeenEvent(Instant.EPOCH.plus(50, ChronoUnit.SECONDS), tag, 1, 1L);
    snapshot = tagSeenEvent2.doApply(snapshot);
    double speedShouldBe = 100D / 50D;
    MatcherAssert.assertThat(snapshot.getTeamStates().getStateForTeam(3).get()
            .getPredictedSpeed(), Matchers.equalTo(speedShouldBe));
    MatcherAssert.assertThat(snapshot.getTeamStates().getStateForTeam(3).get()
            .getSpeed(), Matchers.equalTo(speedShouldBe));
}