### Question:
SpotifySpeech { @EntityProvider("devicename") public List<String> getDeviceNames() { List<String> deviceNames = new ArrayList<>(); for (DeviceEntity device : this.deviceLogic.getDevices()) { deviceNames.add(device.getName()); } return deviceNames; }  @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();  }### Answer:
@Test void testGetDeviceNames() { List<DeviceEntity> list = new ArrayList<>(); DeviceEntity device = new DeviceEntity(); device.setName("test"); list.add(device); when(this.deviceLogic.getDevices()).thenReturn(list); assertThat(this.speech.getDeviceNames().get(0), equalTo("test")); }