ServiceDescription { public String toXml() { return toXml(false); } protected  ServiceDescription(final Builder builder); private  ServiceDescription(); static ServiceDescription.Builder create(final String name,
            final String type); static ServiceDescription.Builder copy(
            final ServiceDescription serviceDescription); @Queryable String getName(); @Queryable String getClassname(); @Queryable String getType(); @Queryable URL getEndpoint(); @Queryable List<Parameter> getParameters(); @Queryable Tool getTool(); @Queryable String getDescription(); @Queryable String getVersion(); @Queryable String getAuthor(); @Queryable String getServiceProvider(); @Queryable String getInstructions(); @Queryable URI getFurtherInfo(); @Queryable URI getLogo(); @Queryable String getIdentifier(); @Queryable List<MigrationPath> getPaths(); @Queryable List<URI> getInputFormats(); @Queryable List<Property> getProperties(); @Override int hashCode(); @Override boolean equals(final Object obj); static ServiceDescription of(final String xml); String toXml(); String toXmlFormatted(); @Override String toString(); static void main(final String[] args); static final URI PROPERTY; static final String AUTHORIZED_ROLES; }
@Test public void testToXml() { String sdXml = sd.toXmlFormatted(); System.out.println(sdXml); try { String sdfname = "serviceDescription.xml"; BufferedWriter out = new BufferedWriter(new FileWriter(sdfname)); out.write(sdXml); out.close(); System.out.println("Wrote service description to file: " + sdfname); } catch (IOException e) { } ServiceDescription nsd = ServiceDescription.of(sdXml); assertTrue( "Re-serialised ServiceDescription does not match the original. ", sd.equals(nsd)); }