writer.close();
writer.flush();
bos.close();
System.out.println(bos.toString());
StaxBuilder builder = new StaxBuilder();
Document doc = builder.build(new ByteArrayInputStream(bos.toByteArray()));
Element element = doc.getRootElement();
addNamespace("b2", "urn:Bean2");
assertValid("/b:root[@b2:bleh='bleh']", element);
assertValid("/b:root[@b2:howdy='howdy']", element);