import siena.remote.XmlSerializer;
public class XmlSerializerTest extends TestCase {
public void testXmlSerializer() throws Exception {
XmlSerializer serializer = new XmlSerializer();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Document document = DocumentHelper.createDocument();
document.addElement("root");
serializer.serialize(document, baos);
Document result = serializer.deserialize(new ByteArrayInputStream(baos.toByteArray()));
assertEquals(result.getRootElement().getName(),
document.getRootElement().getName());
}