### Question:
ConfigFileAppender { public void init() { try { document = builder.newDocument(); document.appendChild(document.createElement("configuration")); } catch (Exception ex) { throw new ConfigurationException("Can initialize new configuration", ex); } } ConfigFileAppender(); void init(); void load(InputStream stream); void addConfig(String key, String defaultValue, String description,
      ConfigTag[] tags); void write(Writer writer);  }### Answer:
@Test public void testInit() { ConfigFileAppender appender = new ConfigFileAppender(); appender.init(); appender.addConfig("hadoop.scm.enabled", "true", "desc", new ConfigTag[] {ConfigTag.OZONE, ConfigTag.SECURITY}); StringWriter builder = new StringWriter(); appender.write(builder); Assert.assertTrue("Generated config should contain property key entry", builder.toString().contains("<name>hadoop.scm.enabled</name>")); Assert.assertTrue("Generated config should contain tags", builder.toString().contains("<tag>OZONE, SECURITY</tag>")); }