@Test public void testToProperties() throws IOException { Config config = ConfigFactory.parseFile(genConfig()); Properties properties = ConfigUtils.toProperties(config); System.out.print(properties); Assert.assertEquals("{metric={sink={stdout={}, elasticsearch={hosts=[localhost:9200], index=alert_metric_test}, kafka={topic=alert_metric_test, bootstrap.servers=localhost:9092}, logger={level=INFO}}}, zkConfig={zkQuorum=localhost:2181, zkRoot=/alert}}", properties.toString()); }