GraphReader { public static List<Point2D> read(String fileName) throws IOException { return read(new FileReader(fileName), fileName); }  static List<Point2D> read(String fileName); static List<Point2D> read(Reader reader, String fileName);  }
@Test public void readListOK() throws Exception { String input = "12.34 56.78\n" + "3.14 3.14\n"; Reader reader = new StringReader(input); List<Point2D> actual = GraphReader.read(reader, "unit test input"); assertEquals(2, actual.size()); assertEquals(new Point2D.Double(12.34, 56.78), actual.get(0)); assertEquals(new Point2D.Double(3.14, 3.14), actual.get(1)); }