@Test public void shouldUnmarshallObject() { String xml = "<Key><Data>someData</Data></Key>"; ByteArrayInputStream inputStream = new ByteArrayInputStream(xml.getBytes()); Key key = new SimpleXmlParser().fromXml(inputStream, new NullProtectionStrategy(), Key.class); Assert.assertEquals("someData", key.getData()); }
public String getData() { return data; }
Key { public String getData() { return data; } }
Key { public String getData() { return data; }  }
Key { public String getData() { return data; }  String getData(); void setData(String data); }
Key { public String getData() { return data; }  String getData(); void setData(String data);  }