@@ -0,0 +1,3147 @@
+/**%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage camelinaction;%0A%0Aimport javax.jms.ConnectionFactory;%0A%0Aimport org.apache.activemq.ActiveMQConnectionFactory;%0Aimport org.apache.camel.CamelContext;%0Aimport org.apache.camel.builder.RouteBuilder;%0Aimport org.apache.camel.component.jms.JmsComponent;%0Aimport org.apache.camel.test.junit4.CamelTestSupport;%0Aimport org.junit.Ignore;%0Aimport org.junit.Test;%0A%0Apublic class OrderRouterSimpleTest extends CamelTestSupport %7B%0A%0A    @Override%0A    protected CamelContext createCamelContext() throws Exception %7B%0A        // create CamelContext%0A        CamelContext camelContext = super.createCamelContext();%0A        %0A        // connect to embedded ActiveMQ JMS broker%0A        ConnectionFactory connectionFactory = %0A            new ActiveMQConnectionFactory(%22vm://localhost%22);%0A        camelContext.addComponent(%22jms%22,%0A            JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));%0A        %0A        return camelContext;%0A    %7D%0A    %0A    @Test%0A    @Ignore(%22TODO enable when we update to Camel 2.17.1 or 2.18%22)%0A    public void testPlacingOrders() throws Exception %7B%0A        getMockEndpoint(%22mock:xml%22).expectedMessageCount(1);%0A        getMockEndpoint(%22mock:csv%22).expectedMessageCount(1);%0A%0A        assertMockEndpointsSatisfied();%0A    %7D%0A    %0A    @Override%0A    protected RouteBuilder createRouteBuilder() throws Exception %7B%0A        return new RouteBuilder() %7B%0A            @Override%0A            public void configure() throws Exception %7B%0A                // load file orders from src/data into the JMS queue%0A                from(%22file:src/data?noop=true%22).to(%22jms:incomingOrders%22);%0A        %0A                // content-based router%0A                from(%22jms:incomingOrders%22)%0A                .choice()%0A                    .when(simple(%22$%7Bheader.CamelFileName%7D ends with 'xml'%22))%0A                        .to(%22jms:xmlOrders%22)  %0A                    .when(simple(%22$%7Bheader.CamelFileName%7D ends with 'csv'%22))%0A                        .to(%22jms:csvOrders%22);%0A                %0A                // test that our route is working%0A                from(%22jms:xmlOrders%22)%0A                .log(%22Received XML order: $%7Bheader.CamelFileName%7D%22)%0A                .to(%22mock:xml%22);                %0A                %0A                from(%22jms:csvOrders%22)%0A                .log(%22Received CSV order: $%7Bheader.CamelFileName%7D%22)%0A                .to(%22mock:csv%22);%0A            %7D%0A        %7D;%0A    %7D%0A%7D%0A

Add cbr with simple testcase