### Question:
FileUtil { public static List<String> readLines (Reader in) throws IOException { List<String> lines = new ArrayList<>(); try (BufferedReader bin = new BufferedReader(in)) { for (String line = null; (line = bin.readLine()) != null; lines.add(line)) {} } return lines; }  static boolean renameTo(File source, File dest); static boolean deleteHarder(File file); static boolean deleteDirHarder(File file); static List<String> readLines(Reader in); static void unpackJar(ZipFile jar, File target, boolean cleanExistingDirs); static void unpackPacked200Jar(File packedJar, File target); static void copy(File source, File target); static void makeExecutable(File file); static void walkTree(File root, Visitor visitor);  }### Answer:
@Test public void testReadLines () throws IOException { String data = "This is a test\nof a file with\na few lines\n"; List<String> lines = FileUtil.readLines(new StringReader(data)); String[] linesBySplit = data.split("\n"); assertEquals(linesBySplit.length, lines.size()); for (int ii = 0; ii < lines.size(); ii++) { assertEquals(linesBySplit[ii], lines.get(ii)); } }