### Question:
TextTableParser { public int getColumnCount() { return columns.size(); } TextTableParser(Reader reader);  TextTableParser(Reader reader, int optionalColumnCount); int getColumnCount(); String getColumn(int index); boolean nextRow();  }### Answer:
@Test public void assertColumnCount() throws Exception { TextTableParser listParser = new TextTableParser(new StringReader("Just some text to be ignored\n" + "----- -- ------\n")); assertEquals("The column count was incorrect", 3, listParser.getColumnCount()); }
@Bug(4666) @Test public void assertDashInTextIsIgnored() throws Exception { TextTableParser listParser = new TextTableParser(new StringReader("Server: server-name\n" + "----- -- ------\n")); assertEquals("The column count was incorrect", 3, listParser.getColumnCount()); }