// which represents the message. We will simulate this with inflow.
StringReader sr = new StringReader(sampleText);
XMLStreamReader inflow = inputFactory.createXMLStreamReader(sr);
// Create a Block from the inflow.
Block block = f.createFrom(inflow, null, null);
// Assuming no handlers are installed, the next thing that will happen
// is the proxy code will ask for the business object (String).
Object bo = block.getBusinessObject(true);
assertTrue(bo instanceof String);