TimerStarted timerStarted = (TimerStarted) messages.get(0);
assertEquals("Initial time", Time.seconds(3), timerStarted.getTime());
assertEquals("Phase when timer started", Phase.POMODORO, timerStarted.getPhase());
TimerTick firstTick = (TimerTick) messages.get(1);
assertEquals("First tick's time", Time.seconds(2), firstTick.getTime());
assertEquals("First tick's phase", Phase.POMODORO, firstTick.getPhase());
TimerTick secondTick = (TimerTick) messages.get(2);
assertEquals("Second tick's time", Time.seconds(1), secondTick.getTime());
assertEquals("Second tick's phase", Phase.POMODORO, secondTick.getPhase());
TimerTick thirdTick = (TimerTick) messages.get(3);
assertEquals("Third tick's time", Time.seconds(0), thirdTick.getTime());
assertEquals("Third tick's phase", Phase.POMODORO, thirdTick.getPhase());
TimerFinished timerFinished = (TimerFinished) messages.get(4);
assertEquals("Phase when timer finished", Phase.POMODORO, timerFinished.getPhase());
}