@Test public void testPlay() { Music theme = mock(Music.class); actor.play(theme); verify(theme, times(1)).play(); verify(theme, times(1)).setLooping(true); }
public void play(Music theme) { if (this.theme != null) { this.theme.stop(); } this.theme = theme; this.theme.setLooping(true); this.theme.play(); }
MusicActor extends Actor implements Disposable { public void play(Music theme) { if (this.theme != null) { this.theme.stop(); } this.theme = theme; this.theme.setLooping(true); this.theme.play(); } }
MusicActor extends Actor implements Disposable { public void play(Music theme) { if (this.theme != null) { this.theme.stop(); } this.theme = theme; this.theme.setLooping(true); this.theme.play(); }  }
MusicActor extends Actor implements Disposable { public void play(Music theme) { if (this.theme != null) { this.theme.stop(); } this.theme = theme; this.theme.setLooping(true); this.theme.play(); }  void play(Music theme); @Override void dispose(); }
MusicActor extends Actor implements Disposable { public void play(Music theme) { if (this.theme != null) { this.theme.stop(); } this.theme = theme; this.theme.setLooping(true); this.theme.play(); }  void play(Music theme); @Override void dispose();  }