@Test
public void countryByName() throws Exception {

    List<Country> countries = CountryUtil.getCountriesByName();
    // first couple element check, name isn't in Country's comparison
    /**
     * AF AFG 004 Afghanistan
LB 008 Albania, People's Socialist Republic of
ZA 012 Algeria, People's Democratic Republic of
SM 016 American Samoa
ND 020 Andorra, Principality of
     */
    Assert.assertEquals(countries.get(0), new Country("AF", "", ""));
    Assert.assertEquals(countries.get(1), new Country("AL", "", ""));
    Assert.assertEquals(countries.get(2), new Country("DZ", "", ""));
    Assert.assertEquals(countries.get(3), new Country("AS", "", ""));
    Assert.assertEquals(countries.get(4), new Country("AD", "", ""));
    Country c0 = countries.get(4);
    Assert.assertEquals("Andorra", c0.getName());
    Assert.assertEquals("Andorra, Principality of", c0.getLongName());
}