TraceUtils { public static HTraceConfiguration wrapHadoopConf(final String prefix, final Configuration conf) { return wrapHadoopConf(prefix, conf, EMPTY); }  static HTraceConfiguration wrapHadoopConf(final String prefix,
        final Configuration conf); static HTraceConfiguration wrapHadoopConf(final String prefix,
        final Configuration conf, List<ConfigurationPair> extraConfig);  }
@Test public void testWrappedHadoopConf() { String key = "sampler"; String value = "ProbabilitySampler"; Configuration conf = new Configuration(); conf.set(TEST_PREFIX + key, value); HTraceConfiguration wrapped = TraceUtils.wrapHadoopConf(TEST_PREFIX, conf); assertEquals(value, wrapped.get(key)); }
@Test public void testExtraConfig() { String key = "test.extra.config"; String oldValue = "old value"; String newValue = "new value"; Configuration conf = new Configuration(); conf.set(TEST_PREFIX + key, oldValue); LinkedList<ConfigurationPair> extraConfig = new LinkedList<ConfigurationPair>(); extraConfig.add(new ConfigurationPair(TEST_PREFIX + key, newValue)); HTraceConfiguration wrapped = TraceUtils.wrapHadoopConf(TEST_PREFIX, conf, extraConfig); assertEquals(newValue, wrapped.get(key)); }