return new RouteBuilder() {
@Override
public void configure() throws Exception {
// START SNIPPET: e1
// setup beanio data format using the mapping file, loaded from the classpath
BeanIODataFormat format = new BeanIODataFormat(
"org/apache/camel/dataformat/beanio/csv/mappingsWithProperties.xml",
"stream1");
Properties properties = new Properties();
properties.setProperty("field1", "firstName");
properties.setProperty("field2", "lastName");
format.setProperties(properties);
// a route which uses the bean io data format to format a CSV data
// to java objects
from("direct:unmarshal")
.unmarshal(format)