Levels implements GlassEventListener { @Override public void figureDropped(Figure figure) { applyLevelIfAccepted(new GlassEvent<>(GlassEvent.Type.FIGURE_DROPPED, figure)); } Levels(GameLevel ... levels); @Override void glassOverflown(); GameLevel getNextLevel(); @Override void linesRemoved(int amount); @Override void figureDropped(Figure figure); GameLevel getCurrentLevel(); int getCurrentLevelNumber(); void setChangeLevelListener(ChangeLevelListener changeLevelListener); int getTotalRemovedLines();  }
@Test public void shouldCallChangeEventListenerWhenLevelChanged() { verify(levelChangedListener).levelChanged(0, level0); acceptLevels(true, false); levels.figureDropped(new TetrisFigure()); verify(levelChangedListener).levelChanged(1, level1); verifyNoMoreInteractions(levelChangedListener); }