@Test
    public void testFromStatic() {
        final String uri = "http://jabber.org/protocol/httpbind";
        final String xmlns = "xmlns='" + uri + "'";
        final String boshNs = "xmlns:bosh='" + uri + "'";
        StaticBody sb;
        ComposableBody db;

        String statics[] = new String[] {
            "<body " + xmlns + "/>",
            "<body\t" + xmlns + "/>",
            "<body\r" + xmlns + "/>",
            "<body\n" + xmlns + "/>",
            "<body " + xmlns + "></body>",
            "<body " + xmlns + ">content</body>",
            "<body " + xmlns + ">con<body>te</body>nt</body>",
            "<bosh:body " + boshNs + "/>",
            "<bosh:body " + boshNs + ">content</bosh:body>",
            "<bosh:body " + boshNs + ">con<body>te</body>nt</bosh:body>",
            "<?xml version='1.0'?>\n<!-- --> <body " + xmlns + "/>",
            "<body " + xmlns + "/> <!-- foo> "
        };
        String payloads[] = new String[] {
            "",
            "",
            "",
            "",
            "",
            "content",
            "con<body>te</body>nt",
            "",
            "content",
            "con<body>te</body>nt",
            "",
            ""
        };
        assertEquals("Bad test definition", statics.length, payloads.length);
        
        for (int i=0; i<statics.length; i++) {
            String id = "statics[" + i + "]='" + statics[i] + "', payloads["
                    + i + "]='" + payloads[i] + "'";
            try {
                sb = StaticBody.fromString(statics[i]);
                db = ComposableBody.fromStaticBody(sb);
                assertEquals(id, payloads[i], db.getPayloadXML());
            } catch (BOSHException boshx) {
                boshx.printStackTrace(System.err);
                fail("Exception thrown during test " + id
                        + "  ==> " + boshx.getMessage());
            }
        }

    }