### Question:
SparkOptionsSplitter { static List<String> splitSparkOpts(final String sparkOpts) { final List<String> result = new ArrayList<>(); final Matcher matcher = OPTION_KEY_PREFIX.matcher(sparkOpts); int start = 0, end; while (matcher.find()) { end = matcher.start(); if (start > 0) { final String maybeQuotedValue = sparkOpts.substring(start, end).trim(); if (StringUtils.isNotEmpty(maybeQuotedValue)) { result.add(unquoteEntirelyQuotedValue(maybeQuotedValue)); } } String sparkOpt = matchSparkOpt(sparkOpts, matcher); if (sparkOpt.endsWith("=")) { sparkOpt = sparkOpt.replaceAll("=", ""); } result.add(sparkOpt); start = matcher.end(); } final String maybeEntirelyQuotedValue = sparkOpts.substring(start).trim(); if (StringUtils.isNotEmpty(maybeEntirelyQuotedValue)) { result.add(unquoteEntirelyQuotedValue(maybeEntirelyQuotedValue)); } return result; }    }### Answer:
@Test public void test() { assertThat("Error for input >>" + input + "<<", SparkOptionsSplitter.splitSparkOpts(input), is(output)); }