@Test
    public void test4LevelsA() {
        xml.openTag("l1");
        xml.openTag("l21").closeTag();
        xml.openTag("l22");
        xml.openTag("l31").openTag("l4").closeTag().closeTag();
        xml.openTag("l32").closeTag();
        xml.closeTag();
        xml.closeTag();
        assertEquals(
                "<l1>\n" +
                "\n" +
                "  <l21/>\n" +
                "\n" +
                "  <l22>\n" +
                "    <l31>\n" +
                "      <l4/>\n" +
                "    </l31>\n" +
                "    <l32/>\n" +
                "  </l22>\n" +
                "\n" +
                "</l1>\n"
                , getWritten());
    }
This test is currently incomplete. Also much tested in the prelude module though.

@author bratseth
vespajlib/src/test/java/com/yahoo/text/XMLWriterTestCase.java