private void test(boolean hasHeader, String input, List<String[]> expOutput) throws Exception {
    StringReader r = new StringReader(input);
    CSVParser p = new CSVParser(r, hasHeader, CSVParser.DELIMINATOR, "\n");

    List<String[]> actual = p.readAll();

    assertEquals(CSVTestUtils.toString(expOutput), CSVTestUtils.toString(actual));
  }
 @Test
 public void testComplete() throws Exception {
   test(CSVTestUtils.createWholeOutput(false), CSVTestUtils.createWholeInput(true));
 }