CountryUtil { public static ArrayList<Country> parse(InputStream is) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(is)); String line = null; ArrayList<Country> c = new ArrayList<Country>(); while ((line = in.readLine()) != null) { if (!line.equals("") && !line.startsWith("#")) { c.add(Country.parse(line)); } } return c; } private  CountryUtil(); static Country lookupByIso2(String iso2); static ArrayList<Country> parse(InputStream is); static List<Country> getCountriesByName();  }
@Test(expected=IOException.class) public void parse() throws Exception { Country c = Country.parse(""); }
@Test(expected=IOException.class) public void parse2() throws Exception { Country c = Country.parse("dffsdfasdf"); }
@Test(expected=IOException.class) public void parse3() throws Exception { Country c = Country.parse("AA AAA 123"); }
@Test(expected=IOException.class) public void parse4() throws Exception { Country c = Country.parse("AA AAA 123 "); }
@Test(expected=IOException.class) public void parse5() throws Exception { Country c = Country.parse(null); }
@Test public void parseOK() throws Exception { Country c = Country.parse("AA AAA 123 J"); }