### Question:
PropertiesUtil { public static Properties combineProperties(Properties props, final Configuration conf) { return combineProperties(props, conf, Collections.<String>emptySet()); } private  PropertiesUtil(); static Properties deepCopy(Properties properties); static Properties combineProperties(Properties props, final Configuration conf); static Properties combineProperties(Properties props, final Configuration conf, Set<String> withoutTheseProps); static Configuration cloneConfig(Configuration toCopy);  }### Answer:
@Test public void testCopyFromConfiguration() throws Exception{ final Configuration conf = HBaseConfiguration.create(); final Properties props = new Properties(); conf.set(HConstants.ZOOKEEPER_QUORUM, HConstants.LOCALHOST); conf.set(PropertiesUtilTest.SOME_OTHER_PROPERTY_KEY, PropertiesUtilTest.SOME_OTHER_PROPERTY_VALUE); Properties combinedProps = PropertiesUtil.combineProperties(props, conf); assertEquals(combinedProps.getProperty(HConstants.ZOOKEEPER_QUORUM), conf.get(HConstants.ZOOKEEPER_QUORUM)); assertEquals(combinedProps.getProperty(PropertiesUtilTest.SOME_OTHER_PROPERTY_KEY), conf.get(PropertiesUtilTest.SOME_OTHER_PROPERTY_KEY)); }
@Test public void testPropertyOverrideRespected() throws Exception { final Configuration conf = HBaseConfiguration.create(); final Properties props = new Properties(); props.setProperty(HConstants.HBASE_RPC_TIMEOUT_KEY, Long.toString(HConstants.DEFAULT_HBASE_RPC_TIMEOUT * 10)); Properties combinedProps = PropertiesUtil.combineProperties(props, conf); assertEquals(combinedProps.getProperty(HConstants.HBASE_RPC_TIMEOUT_KEY), Long.toString(HConstants.DEFAULT_HBASE_RPC_TIMEOUT * 10)); }