@Test
public void shouldMarshallObjectToXml() throws Exception {

    Key key = new Key();
    key.setData("someData");
    ByteArrayOutputStream bos = new SimpleXmlParser().toXml(key);
    String xml = XmlStringCleaner.cleanXmlString(new String(bos.toByteArray()));
    Assert.assertEquals("<Key><Data>someData</Data></Key>", xml);
}