### Question:
SuperCsvParserFactory extends AbstractParserFactory { @Override public SuperCsvParser parse (InputStream input) throws DatasetBuilderException { return new SuperCsvParser (new CsvListReader (new InputStreamReader (input), new Builder (quoteChar, separatorChar, endOfLineSymbols).skipComments (new CommentMatcher () { @Override public boolean isComment (String line) { for (Pattern pattern : commentRegExpressions) if (pattern.matcher (line).matches ()) return true; return false; } }).build ()), rowIdParser); } SuperCsvParserFactory(SuperCsvParser.RowIdParser rowIdParser); SuperCsvParserFactory quoteChar(char quoteChar); @Override void addCommentRegExpression(String regex); SuperCsvParserFactory separatorChar(int separatorChar); SuperCsvParserFactory endOfLineSymbols(String endOfLineSymbols); SuperCsvParserFactory commentRegExpressions(String... commentRegExpressions); @Override String contentType(); @Override SuperCsvParser parse(InputStream input);  }### Answer:
@Test public void testParser () throws Exception { Parser p = new SuperCsvParserFactory ().parse (new ByteArrayInputStream (("\t\tsa\tsb\tsc\n" + "g1\tp1\t.1\t.2\t.3\n" + "g2\tp2\t.4\t.5\t.6").getBytes ())); for (int index = 1; index < 7; index++) { assertTrue (p.next ()); assertEquals (index / 10.0, p.value (), 0.0); } assertFalse (p.next ()); List<String> expectedColumns = new ArrayList<String>(){ private static final long serialVersionUID = 1L; { add("sa"); add("sb"); add("sc"); }}; assertThat(p.columnKeys (), is(expectedColumns)); List<String> expectedRows= new ArrayList<String>(){ private static final long serialVersionUID = 1L; { add("g1"); add("g2"); }}; assertThat(p.rowKeys (), is(expectedRows)); }
@Test public void testGEOParser () throws Exception { URL url = this.getClass ().getResource ("geods/geo.gds.soft.txt"); Parser p = new SuperCsvParserFactory ().parse (new UrlTsvInput (url).input ()); while(p.next ()) { } List<String> expectedRows = new ArrayList<String>(){ private static final long serialVersionUID = 1L; { add("1007_s_at"); add("1053_at"); add("117_at"); } }; assertFalse(p.next ()); assertThat(p.rowKeys (), is(expectedRows)); List<String> expectedColumns = Arrays.asList ("GSM564960\tGSM564961\tGSM564952\tGSM564958\tGSM564953\tGSM564959\tGSM564956\tGSM564957\tGSM564950\tGSM564954\tGSM564951\tGSM564955".split ("\t")); assertThat(p.columnKeys (), is(expectedColumns)); }