WeatherService { public Set<String> getAllIataCodes() { Set<String> resultList = new HashSet<>(); for (Airport airport : repository.getAllAirports()) { resultList.add(airport.getIata()); } return resultList; }  @PostConstruct void loadDefaultAirports(); void resetData(); void setDataPoint(String iataCode, DataPointType type, DataPoint dataPoint); Airport createAirport(String iataCode, double latitude, double longitude); List<Weather> searchAirportWeather(String iataCode, double radiusKm); Airport findAirport(String iataCode); double calculateHaversineDistance(Airport a1, Airport a2); Set<String> getAllIataCodes(); void deleteAirport(String iataCode); void createAirport(Airport airport);  }
@Test public void getAllIataCodesReturnsOk() { assertEquals(1, target.getAllIataCodes().size()); assertEquals("code1", target.getAllIataCodes().iterator().next()); }