w.removeListener(l);
w.write("after listener");
w.end();
w.end();
// Because we are invoking Element.text(), the text added by the listener is appended to the body of the element,
// which is correct but may not be what you'd expect.
assertEquals(w.toString(), "<?xml version=\"1.0\"?>\n" +