public void testMarshalling() throws Exception
{
String ns = "http://www.jboss.org/test/xml/collections";
MarshallerImpl marshaller = new MarshallerImpl();
marshaller.addRootElement(new QName(ns, "collections"));
marshaller.setRootTypeQName(new QName(ns, "collections"));
marshaller.declareNamespace(null, ns);
String xsd = getFullPath("xml/collections.xsd");
StringWriter xml = new StringWriter();
marshaller.marshal(xsd, new MappingObjectModelProvider(), Collections.getInstance(), xml);
String marshalled = xml.getBuffer().toString();
try
{
unmarshalCollections(new StringReader(marshalled));