### Question:
FileUtils { public static String readLineAt(int pos, File filename) throws IOException { try (InputStream is = new BufferedInputStream(new FileInputStream(filename));){ StringBuilder line = new StringBuilder(); byte[] c = new byte[1024]; int count = 0; int readChars = 0; byte lastChar = '\n'; while ((readChars = is.read(c)) != -1) { for (int i = 0; i < readChars; ++i) { if (c[i] == '\n') { if (lastChar != '\n') { ++count; } } else if (count == pos) { line.append((char) c[i]); } lastChar = c[i]; } } return line.toString(); } }  static int countLines(File filename); static String readLineAt(int pos, File filename); static int getHashcodeFromFileContent(String filepath); static String readFile(String path);  }### Answer:
@Test public void readLineAtTest() throws IOException { File f = new File("src/test/resources/fileUtils.txt"); assertEquals("a", FileUtils.readLineAt(0, f)); assertEquals("abc", FileUtils.readLineAt(2, f)); assertEquals("dfe", FileUtils.readLineAt(4, f)); assertEquals("", FileUtils.readLineAt(-1, f)); }