WeatherRepository { public Airport getAirport(String iataCode) { if (! airports.containsKey(iataCode)) { throw new WeatherException("Airport not found for iata code: " + iataCode); } return airports.get(iataCode); }  Airport findAirport(String iataCode); Airport getAirport(String iataCode); void saveAirport(Airport airport); Collection<Airport> getAllAirports(); void deleteAll(); void removeAirport(String iataCode);  }
@Test(expected=WeatherException.class) public void findInexistentThrowsError() { target.getAirport("code2"); }