### Question:
XStreamParser extends AbstractValueParser<T> { public XStreamParser(Class<T> type, XStream xstream) { this.type = type; this.xstream = xstream; } XStreamParser(Class<T> type, XStream xstream); static XStreamParser<T> xml(Class<T> type); static XStreamParser<T> xml(Class<T> type, XStream xstream);  }### Answer:
@Test public void testXStreamParser() throws ResourceObjectException, IOException { String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?><model message=\"Lorem ipsum\"><value>1</value></model>"; ResourceObject file = new ByteArrayResourceObject("test", "test", xml.getBytes(), 0); Model object = file.parsedTo(xml(Model.class)).asIs(); assertEquals("Lorem ipsum", object.getMessage()); assertEquals(1, object.getValue()); }