Package org.apache.camel.impl

Examples of org.apache.camel.impl.MySerialBean


import org.apache.camel.impl.MySerialBean;

public class DataFormatEndpointSerializationTest extends ContextTestSupport {

    public void testSerialization() throws Exception {
        MySerialBean bean = new MySerialBean();
        bean.setId(123);
        bean.setName("Donald");

        Object data = template.requestBody("direct:marshal", bean);
        assertNotNull(data);

        Object out = template.requestBody("direct:unmarshal", data);
        assertNotNull(out);

        MySerialBean outBean = context.getTypeConverter().convertTo(MySerialBean.class, out);
        assertNotNull(outBean);
        assertEquals(123, outBean.getId());
        assertEquals("Donald", outBean.getName());
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.impl.MySerialBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.