}
public void runTest(String value, String expected) throws XMLStreamException, FactoryConfigurationError, IOException {
SOAPFactory factory = OMAbstractFactory.getSOAP12Factory();
SOAPEnvelope envelope = factory.getDefaultEnvelope();
String ns = "http://testuri.org";
OMNamespace namespace = factory.createOMNamespace(ns,"tst");
String ln = "Child";
OMElement bodyChild = factory.createOMElement(ln,namespace);
bodyChild.addChild(factory.createText(value));
envelope.getBody().addChild(bodyChild);
ByteArrayOutputStream byteOutStr = new ByteArrayOutputStream();
XMLStreamWriter writer = XMLOutputFactory
.newInstance().createXMLStreamWriter(byteOutStr,UTF_16);
OMOutputImpl outputImpl = new OMOutputImpl(writer);
outputImpl.setCharSetEncoding(UTF_16);
envelope.serializeWithCache(outputImpl);
outputImpl.flush();
ByteArrayInputStream byteInStr = new ByteArrayInputStream(byteOutStr.toByteArray());
StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(XMLInputFactory.newInstance().createXMLStreamReader(byteInStr, UTF_16),null);
SOAPEnvelope resultEnv = builder.getSOAPEnvelope();
OMElement bodyChildResult = resultEnv.getBody().getFirstElement();
assertNotNull("No child in body element", bodyChildResult);
String result = bodyChildResult.getText();