private <T extends Node> void testToDOM(Object fromXmlContent, Class<T> toNodeType) throws IOException, SAXException {
testToDOM(fromXmlContent, toNodeType, toNodeType) ;
}
private <T extends Node, R extends Node> void testToDOM(Object fromXmlContent, Class<T> toNodeType, Class<R> nodeResultType) throws IOException, SAXException {
DefaultMessage message = newMessage();
message.setContent(fromXmlContent);
T node = message.getContent(toNodeType);
Assert.assertTrue(nodeResultType.isInstance(node));
XMLAssert.assertXMLEqual("<x><y/></x>", AbstractDOMTransformer.serialize(node));
}