Schema extends Node implements
        Comparable<Schema> { public String getValue(String key) { final Node n = getChild(key); return null != n && n instanceof EntryNode ? ((EntryNode) n).getValue() : null; } Schema(); Schema getSchema(); boolean contains(String key); Set<String> getKeys(); String getOverriddenValue(String key); String getValue(String key); Map<String, String> getValues(); void setValues(SortedMap<String, String> values); void setValue(String path, String value); Class<T> getType(); void setType(Class type); String getSubtype(); long getVersion(); int compareTo(Schema compareSchema);  }
@Test public void testCupsClientSchema() throws Exception { final Schema<Application> schema = read("/schemas/cups-client/schema/printer/cups-client.xml"); assertEquals("cups-client", schema.getName()); assertLabel("en", "CUPS client", schema); assertLabel("de", "CUPS client", schema); EntryNode host = assertEntryNode("Host", schema); assertLabel("en", "CUPS Host", host); assertLabel("de", "CUPS Host", host); EntryNode port = assertEntryNode("TCPPort", schema); assertEquals("631", port.getValue()); assertLabel("en", "", port); assertLabel("de", "Port", port); }
@Test public void testRealmSchema() throws Exception { final Schema<Application> schema = read("/schemas/tcos-devices/schema/realm.xml"); assertEquals("realm", schema.getName()); final SectionNode directory = assertSectionNode("Directory", schema); final GroupNode primary = assertGroupNode("Primary", directory); final GroupNode readOnly = assertGroupNode("ReadOnly", primary); final PasswordNode secret = assertPasswordNode("Secret", readOnly); assertEquals("secret", secret.getValue()); }