### Question:
DelimitedStringHelper { public static List<String> splitLine(String line, char splitCharacter, char quoteCharacter, boolean unescapeDoubleQuotes) { Objects.requireNonNull(line, "line must not be null"); List<String> split = new ArrayList<>(); boolean inQuotes = false; int previousIdx = 0; for (int idx = 0; idx < line.length(); idx++) { char c = line.charAt(idx); if (c == splitCharacter && !inQuotes) { split.add(trimQuotes(line.substring(previousIdx, idx), quoteCharacter, unescapeDoubleQuotes)); previousIdx = idx + 1; } else if (c == quoteCharacter) { inQuotes = !inQuotes; } } if (inQuotes) { return null; } split.add(trimQuotes(line.substring(previousIdx), quoteCharacter, unescapeDoubleQuotes)); return split; } private  DelimitedStringHelper(); static List<String> splitLine(String line, char splitCharacter, char quoteCharacter,
			boolean unescapeDoubleQuotes); static List<String> splitLine(String line, char splitCharacter, char quoteCharacter);  }### Answer:
@Test public void testSplit() { String line = "'a','b','c'"; List<String> split = DelimitedStringHelper.splitLine(line, ',', '\''); assertEquals(Arrays.asList("a", "b", "c"), split); }
@Test public void testSplitWithQuotes() { String line = "'a','b,c','d'"; List<String> split = DelimitedStringHelper.splitLine(line, ',', '\''); assertEquals(Arrays.asList("a", "b,c", "d"), split); }
@Test public void testSplitUnbalanced() { String line = "'a','b','c"; List<String> split = DelimitedStringHelper.splitLine(line, ',', '\''); assertNull(split); }
@Test public void testSplitDoubleEscaped() { String line = "'test ''in quotes''','test'"; List<String> split = DelimitedStringHelper.splitLine(line, ',', '\'', true); assertEquals(Arrays.asList("test 'in quotes'", "test"), split); }