### Question:
Levels implements GlassEventListener { @Override public void glassOverflown() { applyLevelIfAccepted(new GlassEvent<Void>(GlassEvent.Type.GLASS_OVERFLOW, null)); } Levels(GameLevel ... levels); @Override void glassOverflown(); GameLevel getNextLevel(); @Override void linesRemoved(int amount); @Override void figureDropped(Type figureType); GameLevel getCurrentLevel(); int getCurrentLevelNumber(); void onChangeLevel(ChangeLevelListener listener); int totalRemovedLines(); void clearScore();  }### Answer:
@Test public void shouldNotApplyLevelWhenLevelIsApplied() { acceptLevels(true, false); levels.glassOverflown(); acceptLevels(true, true); levels.glassOverflown(); verify(level1, times(1)).accept(any()); verify(level1, times(1)).apply(); verify(level2, times(1)).apply(); }