public void testXmlBeans() throws Exception {
mapper = getMapper(new String[] { "xmlBeansMapping.xml" });
// Map from TestObject to XMLBeans
TestObject to = (TestObject) newInstance(TestObject.class);
to.setOne("one");
GetWeatherByZipCodeDocument doc = mapper.map(to, GetWeatherByZipCodeDocument.class);
assertEquals(to.getOne(), doc.getGetWeatherByZipCode().getZipCode());
// Map from XMLBeans to TestObject
GetWeatherByZipCodeDocument res = GetWeatherByZipCodeDocument.Factory.newInstance();
GetWeatherByZipCode zipCode = res.addNewGetWeatherByZipCode();
zipCode.setZipCode("one");
TestObject to2 = mapper.map(res, TestObject.class);
assertEquals(res.getGetWeatherByZipCode().getZipCode(), to2.getOne());
Set set = new HashSet();
AnotherTestObject ato = new AnotherTestObject();
ato.setDay("day");
set.add(ato);