@Test public void start() { Timer timer = mock(Timer.class); Game delegate = mock(Game.class); DelayedStartingGame delayedStartingGame = new DelayedStartingGame(delegate, timer); delayedStartingGame.start(); verify(delegate).start(); verify(delegate).setState(GameState.STARTING); verify(timer).start(); }
@Override public void start() { super.start(); this.setState(GameState.STARTING); this.startingTimer.start(); }
DelayedStartingGame extends DelegatingGame { @Override public void start() { super.start(); this.setState(GameState.STARTING); this.startingTimer.start(); } }
DelayedStartingGame extends DelegatingGame { @Override public void start() { super.start(); this.setState(GameState.STARTING); this.startingTimer.start(); } DelayedStartingGame(Game delegate, Timer startingTimer); }
DelayedStartingGame extends DelegatingGame { @Override public void start() { super.start(); this.setState(GameState.STARTING); this.startingTimer.start(); } DelayedStartingGame(Game delegate, Timer startingTimer); @Override void start(); }
DelayedStartingGame extends DelegatingGame { @Override public void start() { super.start(); this.setState(GameState.STARTING); this.startingTimer.start(); } DelayedStartingGame(Game delegate, Timer startingTimer); @Override void start();  }