Assertion as = new XMLPrimitiveAssertionBuilder().build(getElementFromString(text),
policyEngine.getAssertionBuilderFactory());
assertNotNull(as);
PrimitiveAssertion pas = (PrimitiveAssertion)as;
assertEquals("10", pas.getTextValue());
assertEquals("blah", pas.getAttribute(new QName("FooAtt")));
StringWriter writer = new StringWriter();
XMLStreamWriter xwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer);
pas.serialize(xwriter);
xwriter.flush();
Element el = getElementFromString(writer.getBuffer().toString());
assertEquals("blah", el.getAttribute("FooAtt"));
assertEquals("10", el.getTextContent());