@Test public void start() { Game delegate = mock(Game.class); StartStateChangingGame startStateChangingGame = new StartStateChangingGame(delegate); startStateChangingGame.start(); verify(delegate, times(0)).start(); verify(delegate).setState(GameState.ACTIVE); }
@Override public void start() { super.setState(GameState.ACTIVE); }
StartStateChangingGame extends DelegatingGame { @Override public void start() { super.setState(GameState.ACTIVE); } }
StartStateChangingGame extends DelegatingGame { @Override public void start() { super.setState(GameState.ACTIVE); } StartStateChangingGame(Game delegate); }
StartStateChangingGame extends DelegatingGame { @Override public void start() { super.setState(GameState.ACTIVE); } StartStateChangingGame(Game delegate); @Override void start(); }
StartStateChangingGame extends DelegatingGame { @Override public void start() { super.setState(GameState.ACTIVE); } StartStateChangingGame(Game delegate); @Override void start();  }