@Test public void xsd() throws Exception { LeaseConfigurationParser parser = new LeaseConfigurationParser(); StreamSource xsdSource = (StreamSource) parser.getXmlSchema(); StringBuilder stringBuilder = new StringBuilder(); try (InputStream inputStream = xsdSource.getInputStream()) { int value; while ((value = inputStream.read()) != -1) { stringBuilder.append((char) value); } } String xsd = stringBuilder.toString(); assertTrue(xsd.contains("<xs:import namespace=\"http: assertTrue(xsd.contains("<xs:element name=\"connection-leasing\" type=\"lease:connection-leasing-type\" substitutionGroup=\"tc:service-content\">")); assertTrue(xsd.contains("<xs:element name=\"lease-length\" type=\"lease:lease-length-type\" minOccurs=\"1\" maxOccurs=\"1\">")); }
@Override public Source getXmlSchema() throws IOException { return new StreamSource(XML_SCHEMA.openStream()); }
LeaseConfigurationParser implements ServiceConfigParser { @Override public Source getXmlSchema() throws IOException { return new StreamSource(XML_SCHEMA.openStream()); } }
LeaseConfigurationParser implements ServiceConfigParser { @Override public Source getXmlSchema() throws IOException { return new StreamSource(XML_SCHEMA.openStream()); }  }
LeaseConfigurationParser implements ServiceConfigParser { @Override public Source getXmlSchema() throws IOException { return new StreamSource(XML_SCHEMA.openStream()); }  @Override Source getXmlSchema(); @Override URI getNamespace(); @Override LeaseConfiguration parse(Element element, String source); Function<Element, LeaseElement> parser(); ConfigValidator getConfigValidator(); }
LeaseConfigurationParser implements ServiceConfigParser { @Override public Source getXmlSchema() throws IOException { return new StreamSource(XML_SCHEMA.openStream()); }  @Override Source getXmlSchema(); @Override URI getNamespace(); @Override LeaseConfiguration parse(Element element, String source); Function<Element, LeaseElement> parser(); ConfigValidator getConfigValidator();  }