### Question:
TextTableParser { public boolean nextRow() throws IOException { do { currentLine = reader.readLine(); } while ((currentLine != null) && (currentLine.length() < lastMandatoryColumnStart)); return (currentLine != null); } TextTableParser(Reader reader);  TextTableParser(Reader reader, int optionalColumnCount); int getColumnCount(); String getColumn(int index); boolean nextRow();  }### Answer:
@Test public void assertThatReaderWithoutTableIsParsed() throws Exception { TextTableParser listParser = new TextTableParser(new StringReader("Just some text to be ignored")); assertFalse("There should not be any row", listParser.nextRow()); }
@Test public void assertNextRow() throws Exception { TextTableParser listParser = new TextTableParser(new StringReader("Just some text to be ignored\n" + "----- -- ------\n" + "AAAAA BB CCCCCC\n" + "LLLLL DD ZZZZZZ")); assertTrue("The nextLine() returned false", listParser.nextRow()); assertTrue("The nextLine() returned false", listParser.nextRow()); assertFalse("The nextLine() returned true", listParser.nextRow()); }