InformationCollector implements GlassEventListener, ChangeLevelListener, Information { @Override public void levelChanged(int levelNumber, GameLevel level) { playerScores.levelChanged(levelNumber, level); pool.add(LEVEL + " " + (levelNumber + 1)); } InformationCollector(TetrisPlayerScores playerScores); @Override void glassOverflown(); @Override void linesRemoved(int amount); @Override void figureDropped(Figure figure); @Override String getMessage(); @Override void levelChanged(int levelNumber, GameLevel level); void setInfo(String information);  }
@Test public void shouldCallPlayerScoreWhenLevelChanged() { GameLevel mock = mock(GameLevel.class); collector.levelChanged(14, mock); verify(playerScores).levelChanged(14, mock); }