@Test public void testUnmarshallSettings() throws Exception { String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" + "<settings>" + "<fooEnabled>true</fooEnabled>" + "<message>Hello OXM</message>" + "<message1>Hello OXM</message1>" + "</settings>"; Settings result = (Settings) unmarshaller.unmarshal(new StreamSource(new StringReader(xml))); assertThat(result.getMessage(), is("Hello OXM")); assertThat(result.isFooEnabled(), is(true)); }
@Before public void setUp() throws Exception { settings = new Settings(); settings.setMessage("Hello OXM"); settings.setFooEnabled(true); }