Countries { public final static CountryBean get(String nameOrCode){ if(nameOrCode==null||nameOrCode.trim().length()==0) throw new IllegalArgumentException("illegal country name or code!"); if(countryMap==null){ buildMap(); } return countryMap.get(nameOrCode.toLowerCase()); }  final static CountryBean get(String nameOrCode);  }
@Test public void toLatLong(){ Assert.assertEquals("HK", Countries.get("HK").getCode()); Assert.assertEquals("Taiwan", Countries.get("taiwan").getName()); Assert.assertEquals("US", Countries.get("United States").getCode()); }