### Question:
SparkArgsExtractor { @VisibleForTesting void appendOoziePropertiesToSparkConf(final List<String> sparkArgs) { for (final Map.Entry<String, String> oozieConfig : actionConf .getValByRegex("^oozie\\.(?!launcher|spark).+").entrySet()) { sparkArgs.add(CONF_OPTION); sparkArgs.add(String.format("spark.%s=%s", oozieConfig.getKey(), oozieConfig.getValue())); } } SparkArgsExtractor(final Configuration actionConf);   }### Answer:
@Test public void testAppendOoziePropertiesToSparkConf() throws Exception { final List<String> sparkArgs = new ArrayList<>(); final Configuration actionConf = new Configuration(); actionConf.set("foo", "foo-not-to-include"); actionConf.set("oozie.launcher", "launcher-not-to-include"); actionConf.set("oozie.spark", "spark-not-to-include"); actionConf.set("oozie.bar", "bar"); new SparkArgsExtractor(actionConf).appendOoziePropertiesToSparkConf(sparkArgs); assertEquals(Arrays.asList("--conf", "spark.oozie.bar=bar"), sparkArgs); }