MusicPerformer implements StepPerformer { @Override public void disable() { stop(); } protected  MusicPerformer(MediaPlayer mediaPlayer, RainbowInputController rainbowInputController); static MusicPerformer newInstance(RainbowInputController rainbowInputController); @Override void init(); @Override void doStep(); @Override void reset(); @Override void disable(); @Override void enable();  }
@Test public void testThatWhenResetIsCalledIfItIsPlayingMediaPlayerReleaseIsCalled() { givenThatIsPlaying(); musicPerformer.disable(); verify(mediaPlayer).release(); }
@Test public void testThatWhenResetIsCalledIfItIsNotPlayingMediaPlayerReleaseIsNotCalled() { givenThatIsNotPlaying(); musicPerformer.disable(); verify(mediaPlayer, never()).release(); }