@@ -0,0 +1,1207 @@
+package com.splicemachine.derby.impl.load;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Apublic class SpliceImportCoprocessorTest %7B%0A%09@Test%0A%09public void testParseCsvLine() throws Exception %7B%0A%0A%09%09// arbitrary character as delimiter with trailing delimiter%0A%09%09Assert.assertArrayEquals(new String%5B%5D%7B%22a%22, %22b%22, %22%22%7D,%0A%09%09%09%09SpliceImportCoprocessor.parseCsvLine(%22x%22, %22axbx%22));%0A%0A%09%09// delimiter in the data%0A%09%09Assert.assertArrayEquals(new String%5B%5D%7B%22joe%22, %22billy, the kid%22, %22jim%22%7D,%0A%09%09%09%09SpliceImportCoprocessor.parseCsvLine(%22,%22, %22%5C%22joe%5C%22,%5C%22billy, the kid%5C%22,jim%22));%0A%0A%09%09// empty field in the middle%0A%09%09Assert.assertArrayEquals(new String%5B%5D%7B%22joe%22, %22%22, %22jim%22%7D,%0A%09%09%09%09SpliceImportCoprocessor.parseCsvLine(%22,%22, %22joe,,jim%22));%0A%0A%09%09// tabs as delimiters%0A%09%09Assert.assertArrayEquals(new String%5B%5D%7B%22joe%22, %22jim%22%7D,%0A%09%09%09%09SpliceImportCoprocessor.parseCsvLine(%22%5Ct%22, %22joe%5Ctjim%22));%0A%09%7D%0A%0A%09@Test(expected=IndexOutOfBoundsException.class)%0A%09public void testParseCsvLineNoDelimiterSpecified() throws Exception %7B%0A%09%09SpliceImportCoprocessor.parseCsvLine(%22%22, %22joe%5Ctjim%22);%0A%09%7D%0A%0A%09@Test(expected=NullPointerException.class)%0A%09public void testParseCsvLineNullDelimiterSpecified() throws Exception %7B%0A%09%09SpliceImportCoprocessor.parseCsvLine(null, %22joe%5Ctjim%22);%0A%09%7D%0A%7D%0A

Use opencsv library for CSV parsing rather than just splitting on the delimiter. This handles delimiters quoted in the data.