@Test void testGetCurrentSong() { when(this.track.toString()).thenReturn("test"); when(this.playerlogic.getCurrentSong()).thenReturn(this.track); assertThat(this.speech.getCurrentSong(new HashMap<>()).getText(), equalTo("track: test")); when(this.playerlogic.getCurrentSong()).thenReturn(null); assertThat(this.speech.getCurrentSong(new HashMap<>()).getText(), equalTo("No song is playing")); }
@Intent() public Response getCurrentSong(Map<String, EntityData> entites) { TrackEntity track = this.playerLogic.getCurrentSong(); if (track != null) { return Response.text("track: " + track.toString()) .widget("app-current-song") .build(); } return Response.text("No song is playing").build(); }
SpotifySpeech { @Intent() public Response getCurrentSong(Map<String, EntityData> entites) { TrackEntity track = this.playerLogic.getCurrentSong(); if (track != null) { return Response.text("track: " + track.toString()) .widget("app-current-song") .build(); } return Response.text("No song is playing").build(); } }
SpotifySpeech { @Intent() public Response getCurrentSong(Map<String, EntityData> entites) { TrackEntity track = this.playerLogic.getCurrentSong(); if (track != null) { return Response.text("track: " + track.toString()) .widget("app-current-song") .build(); } return Response.text("No song is playing").build(); }  }
SpotifySpeech { @Intent() public Response getCurrentSong(Map<String, EntityData> entites) { TrackEntity track = this.playerLogic.getCurrentSong(); if (track != null) { return Response.text("track: " + track.toString()) .widget("app-current-song") .build(); } return Response.text("No song is playing").build(); }  @Intent() String getDevices(Map<String, EntityData> entites); @Intent() Response getCurrentSong(Map<String, EntityData> entites); @Intent() String getPlaylists(Map<String, EntityData> entites); @Intent() String playSomething(Map<String, EntityData> entites); @Intent() String control(Map<String, EntityData> entites); @Intent() String volume(Map<String, EntityData> entites); @Intent() String volumePercent(Map<String, EntityData> entites); @Intent() String setDeviceId(Map<String, EntityData> entites); @Intent() String setDeviceName(Map<String, EntityData> entites); @Intent() String playPlaylistId(Map<String, EntityData> entites); @Intent() Response searchASong(Map<String, EntityData> entites); @EntityProvider("devicename") List<String> getDeviceNames(); }
SpotifySpeech { @Intent() public Response getCurrentSong(Map<String, EntityData> entites) { TrackEntity track = this.playerLogic.getCurrentSong(); if (track != null) { return Response.text("track: " + track.toString()) .widget("app-current-song") .build(); } return Response.text("No song is playing").build(); }  @Intent() String getDevices(Map<String, EntityData> entites); @Intent() Response getCurrentSong(Map<String, EntityData> entites); @Intent() String getPlaylists(Map<String, EntityData> entites); @Intent() String playSomething(Map<String, EntityData> entites); @Intent() String control(Map<String, EntityData> entites); @Intent() String volume(Map<String, EntityData> entites); @Intent() String volumePercent(Map<String, EntityData> entites); @Intent() String setDeviceId(Map<String, EntityData> entites); @Intent() String setDeviceName(Map<String, EntityData> entites); @Intent() String playPlaylistId(Map<String, EntityData> entites); @Intent() Response searchASong(Map<String, EntityData> entites); @EntityProvider("devicename") List<String> getDeviceNames();  }