### Question:
MessageHelper { @SuppressWarnings("unchecked") public <T> T deserialize(WebServiceMessage message, Class<T> targetClass) throws Exception { Assert.notNull(message, "message can not be null"); Assert.notNull(targetClass, "targetClass can not be null"); MethodParameter parameter = new SmockMethodParameter(targetClass,0); MessageContext messageContext = new DefaultMessageContext(message, messageFactory); for (MethodArgumentResolver resolver: adapter.getMethodArgumentResolvers()) { if (resolver.supportsParameter(parameter)){ Object result = resolver.resolveArgument(messageContext, parameter); if (result != null) { return (T) result; } } } return null; } MessageHelper(WebServiceMessageFactory messageFactory); @SuppressWarnings("unchecked") T deserialize(WebServiceMessage message, Class<T> targetClass); WebServiceMessage serialize(Object data);  }### Answer:
@Test public void testDeserializeToDom() throws Exception { Element element = messageHelper.deserialize(createMessage("xml/request1.xml"), Element.class); assertNotNull(element); }
@Test public void testDeserializeToSource() throws Exception { Source source = messageHelper.deserialize(createMessage("xml/request1.xml"), Source.class); assertNotNull(source); }