@Test
    public void testMarshall_Simple() throws Exception {
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        dbf.setNamespaceAware(true);
        DocumentBuilder builder = dbf.newDocumentBuilder();
        Document document = builder.newDocument();
        Element bookElem = document.createElementNS("urn:ns1", "book");
        document.appendChild(bookElem);
        
        Element authorElem = document.createElementNS("urn:ns1", "author");
        Element titleElem = document.createElementNS("urn:ns1", "title");
        Element genreElem = document.createElementNS("urn:ns1", "genre");
        
        authorElem.setTextContent("Gambardella, Matthew");
        titleElem.setTextContent("title");
        genreElem.setTextContent("Computer");
        
        bookElem.appendChild(authorElem);
        bookElem.appendChild(titleElem);
        bookElem.appendChild(genreElem);
        
        XmlPayloadIO io = new XmlPayloadIO();
        byte[] xmlBytes = io.marshall(document);
        String xml = new String(xmlBytes);
        String expected = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>"
                + "<book xmlns=\"urn:ns1\">"
                    + "<author>Gambardella, Matthew</author>"
                    + "<title>title</title>"
                    + "<genre>Computer</genre>"
                + "</book>";
        Assert.assertEquals(expected, xml);
    }
Test method for {@link io.apiman.gateway.engine.io.XmlPayloadIO#marshall(org.w3c.dom.Document)}.
gateway/engine/core/src/test/java/io/apiman/gateway/engine/io/XmlPayloadIOTest.java