@Test public void testCountryResponse() throws Exception { CountryService countryService = new CountryService(URLFetchServiceFactory.getURLFetchService(), ImagesServiceFactory.getImagesService()); Country country = countryService.getCountry("TR"); }
public Country getCountry(String countryCode) { Preconditions.checkNotNull(countryCode); try { return ofy().load().type(Country.class).id(countryCode).safe(); } catch (NotFoundException e) { return createCountry(countryCode); } }
CountryService { public Country getCountry(String countryCode) { Preconditions.checkNotNull(countryCode); try { return ofy().load().type(Country.class).id(countryCode).safe(); } catch (NotFoundException e) { return createCountry(countryCode); } } }
CountryService { public Country getCountry(String countryCode) { Preconditions.checkNotNull(countryCode); try { return ofy().load().type(Country.class).id(countryCode).safe(); } catch (NotFoundException e) { return createCountry(countryCode); } }  }
CountryService { public Country getCountry(String countryCode) { Preconditions.checkNotNull(countryCode); try { return ofy().load().type(Country.class).id(countryCode).safe(); } catch (NotFoundException e) { return createCountry(countryCode); } }  Country getCountry(String countryCode); Map<Key<Country>, Country> getCountries(String... countryCodes); Collection<Country> searchCountry(String q); }
CountryService { public Country getCountry(String countryCode) { Preconditions.checkNotNull(countryCode); try { return ofy().load().type(Country.class).id(countryCode).safe(); } catch (NotFoundException e) { return createCountry(countryCode); } }  Country getCountry(String countryCode); Map<Key<Country>, Country> getCountries(String... countryCodes); Collection<Country> searchCountry(String q);  }