XStream xstream = new XStream(new DomDriver());
xstream.alias("TomsClass", TestBean.class);
TestBean bean = new TestBean();
assertTrue("Expected start with [<TomsClass>]. Got [" + xml + "]", xml.startsWith("<TomsClass>"));
xstream.fromXML(xml, bean);
assertEquals("Tom", bean.getName());
assertEquals("1234", bean.getPhone());
}