public class CamelJaxbFallbackConverterTest extends CamelTestSupport {
@Test
public void testFallbackConverterWithoutObjectFactory() throws Exception {
TypeConverter converter = context.getTypeConverter();
Foo foo = converter.convertTo(Foo.class,
"<foo><zot name=\"bar1\" value=\"value\" otherValue=\"otherValue\"/></foo>");
assertNotNull("foo should not be null", foo);
assertEquals("value", foo.getBarRefs().get(0).getValue());
foo.getBarRefs().clear();
Bar bar = new Bar();
bar.setName("myName");
bar.setValue("myValue");
foo.getBarRefs().add(bar);
Exchange exchange = new DefaultExchange(context);
exchange.setProperty(Exchange.CHARSET_NAME, "UTF-8");
String value = converter.convertTo(String.class, exchange, foo);