Context messageContext = new Context(context);
Element element = new Element("root", "b", "urn:Bean");
new Document(element);
AttributeBean bean = new AttributeBean();
type.writeObject(bean, new JDOMWriter(element), messageContext);
assertValid("/b:root[@xyzzy:attrExplicitString]", element);
assertXPathEquals("/b:root/@xyzzy:attrExplicitString", "attrExplicit", element);
assertValid("/b:root[@pkg:attrPlainString]", element);
assertXPathEquals("/b:root/@pkg:attrPlainString", "attrPlain", element);
}