### Question:
MessageHelper { public WebServiceMessage serialize(Object data) throws Exception { Assert.notNull(data, "data can not be null"); MethodParameter parameter = new SmockMethodParameter(getTargetClass(data),-1); MessageContext messageContext = new DefaultMessageContext(messageFactory); for (MethodReturnValueHandler methodReturnValueHandler : adapter.getMethodReturnValueHandlers()) { if (methodReturnValueHandler.supportsReturnType(parameter)) { methodReturnValueHandler.handleReturnValue(messageContext, parameter, data); return messageContext.getResponse(); } } return null; } MessageHelper(WebServiceMessageFactory messageFactory); @SuppressWarnings("unchecked") T deserialize(WebServiceMessage message, Class<T> targetClass); WebServiceMessage serialize(Object data);  }### Answer:
@Test public void testSerializeFromDom() throws Exception { Element element = XmlUtil.loadDocument(fromResource("xml/request1.xml")).getDocumentElement(); WebServiceMessage message = messageHelper.serialize(element); assertNotNull(message); }
@Test public void testSerializeFromSource() throws Exception { Source source = fromResource("xml/request1.xml"); WebServiceMessage message = messageHelper.serialize(source); assertNotNull(message); }