public final void testReadLineByLine() throws IOException, BatchException {
    int[] lineCounts = new int[] {10, 100, 1000, 10000, 100000};
    Padding pad = new Padding("*", 10);
    for (int lc : lineCounts) {
      File testFile = genererateTestFile(lc, pad);
      System.out.println("Test file " + testFile.getAbsolutePath() + " (" + lc + " lines)");

      try {
        TestReader bfr = new TestReader(testFile.getAbsolutePath(), 5, true);
        long readCount = 0;
        while (bfr.readLine() != null) {
          readCount++;
        }
        assertEquals(lc, readCount);
      } finally {
        if (!testFile.delete()) {
          testFile.deleteOnExit();
        }
      }
    }
  }