### Question:
NavigationSpeechPlayer implements SpeechPlayer { @Override public void play(SpeechAnnouncement speechAnnouncement) { speechPlayerProvider.retrieveSpeechPlayer().play(speechAnnouncement); } NavigationSpeechPlayer(SpeechPlayerProvider speechPlayerProvider); @Override void play(SpeechAnnouncement speechAnnouncement); @Override boolean isMuted(); @Override void setMuted(boolean isMuted); @Override void onOffRoute(); @Override void onDestroy();  }### Answer:
@Test public void onPlayAnnouncement_mapboxSpeechPlayerIsGivenAnnouncement() { MapboxSpeechPlayer speechPlayer = mock(MapboxSpeechPlayer.class); NavigationSpeechPlayer navigationSpeechPlayer = buildNavigationSpeechPlayer(speechPlayer); SpeechAnnouncement announcement = mock(SpeechAnnouncement.class); navigationSpeechPlayer.play(announcement); verify(speechPlayer).play(announcement); }
@Test public void onPlayAnnouncement_androidSpeechPlayerIsGivenAnnouncement() { AndroidSpeechPlayer speechPlayer = mock(AndroidSpeechPlayer.class); NavigationSpeechPlayer navigationSpeechPlayer = buildNavigationSpeechPlayer(speechPlayer); SpeechAnnouncement announcement = mock(SpeechAnnouncement.class); navigationSpeechPlayer.play(announcement); verify(speechPlayer).play(announcement); }