ZConfig { public String getValue(String path) { return getValue(path,null); } ZConfig(String name,ZConfig parent); void setName(String name); String getName(); String getValue(String path); String getValue(String path,String defaultValue); boolean pathExists(String path); void addComment(String comment); ZConfig putValue(String path,String value ); void save(String filename); static ZConfig load(String filename);  }
@Test public void testPutGet(){ assert(conf.getValue("/curve/public-key").equals("abcdefg")); assert(conf.getValue("curve/secret-key").equals("(w3lSF/5yv&j*c&0h{4JHe(CETJSksTr.QSjcZE}")); assert(conf.getValue("/metadata/name").equals("key-value tests")); assert(conf.getValue("/metadata/nothinghere","default").equals("default")); }