You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/06/06 07:10:30 UTC

[camel] branch camel-2.x updated (afe37e4 -> 8885525)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from afe37e4  Fixing Karaf itests when not run with bash
     new 63fbe63  Regen
     new d673e97  CAMEL-13316: Olingo components handle value/property results
     new 91a2969  CAMEL-13316: Fixed CS for Olingo 2
     new 8885525  fix(13606): Stop Olingo Index Classes generating NP Exceptions

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 camel-core/readme.adoc                             |  82 +++++++-
 .../camel/component/olingo2/Olingo2Consumer.java   |   4 +-
 .../camel/component/olingo2/Olingo2Index.java      |  71 ++++++-
 .../olingo2/Olingo2ComponentConsumerTest.java      | 234 +++++++++++++++++++++
 ...Test.java => Olingo2ComponentProducerTest.java} | 106 +---------
 .../camel/component/olingo4/Olingo4Consumer.java   |   9 +-
 .../camel/component/olingo4/Olingo4Index.java      |  23 +-
 .../olingo4/Olingo4ComponentConsumerTest.java      | 211 +++++++++++++++++++
 ...Test.java => Olingo4ComponentProducerTest.java} | 105 +--------
 components/readme.adoc                             |  98 +++------
 docs/components/modules/ROOT/nav.adoc              |   2 +-
 11 files changed, 665 insertions(+), 280 deletions(-)
 create mode 100644 components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentConsumerTest.java
 rename components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/{Olingo2ComponentTest.java => Olingo2ComponentProducerTest.java} (79%)
 create mode 100644 components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentConsumerTest.java
 rename components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/{Olingo4ComponentTest.java => Olingo4ComponentProducerTest.java} (82%)


[camel] 02/04: CAMEL-13316: Olingo components handle value/property results

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d673e97c101e0d06301932a147d6e762832112c1
Author: phantomjinx <p....@phantomjinx.co.uk>
AuthorDate: Mon Mar 18 15:30:17 2019 +0000

    CAMEL-13316: Olingo components handle value/property results
    
    * When split, both olingo components handle results which are values or
      properties rather than entities.
    
    * Provides tests confirming the fix.
---
 .../camel/component/olingo2/Olingo2Consumer.java   |  4 +-
 .../component/olingo2/Olingo2ComponentTest.java    | 51 +++++++++++++++++++---
 .../camel/component/olingo4/Olingo4Consumer.java   |  9 +++-
 .../component/olingo4/Olingo4ComponentTest.java    | 35 ++++++++++++++-
 4 files changed, 89 insertions(+), 10 deletions(-)

diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Consumer.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Consumer.java
index e92d96d..d069318 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Consumer.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Consumer.java
@@ -144,7 +144,9 @@ public class Olingo2Consumer extends AbstractApiConsumer<Olingo2ApiName, Olingo2
             for (ODataEntry entry : odataFeed.getEntries()) {
                 splitResult.add(entry);
             }
-        } else if (result instanceof ODataEntry) {
+        } else if (result instanceof List) {
+            return result;
+        } else {
             splitResult.add(result);
         }
 
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java
index c60a3d9..cdaa7e6 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java
@@ -121,6 +121,7 @@ public class Olingo2ComponentTest extends AbstractOlingo2TestSupport {
         LOG.info("Manufacturer: {}", properties);
     }
 
+    @SuppressWarnings( "unchecked" )
     @Test
     public void testCreateUpdateDelete() throws Exception {
         final Map<String, Object> data = getEntityData();
@@ -163,6 +164,7 @@ public class Olingo2ComponentTest extends AbstractOlingo2TestSupport {
         return data;
     }
 
+    @SuppressWarnings( "unchecked" )
     @Test
     public void testBatch() throws Exception {
         final List<Olingo2BatchRequest> batchParts = new ArrayList<>();
@@ -296,10 +298,42 @@ public class Olingo2ComponentTest extends AbstractOlingo2TestSupport {
     }
 
     /**
-     *
-     * Read entity set of the People object
-     * and with no filter already seen, all items
-     * should be present in each message
+     * Read value of the People object and split the results
+     * into individual messages
+     */
+    @SuppressWarnings( "unchecked" )
+    @Test
+    public void testConsumerReadClientValuesSplitResults() throws Exception {
+        final Map<String, Object> headers = new HashMap<>();
+        String endpoint = "olingo2://read/Manufacturers('1')/Address?consumer.splitResult=true";
+
+        this.context.setTracing(true);
+        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-value");
+        mockEndpoint.expectedMinimumMessageCount(1);
+        mockEndpoint.setResultWaitTime(60000);
+
+        final Map<String, Object> resultValue = requestBodyAndHeaders(endpoint, null, headers);
+        assertNotNull(resultValue);
+
+        mockEndpoint.assertIsSatisfied();
+        //
+        // 1 individual message in the exchange
+        //
+        Object body = mockEndpoint.getExchanges().get(0).getIn().getBody();
+        assertIsInstanceOf(Map.class, body);
+        Map<String, Object> value = (Map<String, Object>) body;
+        Object addrObj = value.get("Address");
+        assertIsInstanceOf(Map.class, addrObj);
+        Map<String, Object> addrMap = (Map<String, Object>) addrObj;
+        assertEquals("70173", addrMap.get("ZipCode"));
+        assertEquals("Star Street 137", addrMap.get("Street"));
+        assertEquals("Germany", addrMap.get("Country"));
+        assertEquals("Stuttgart", addrMap.get("City"));
+    }
+
+    /**
+     * Read entity set of the People object and with no filter already seen, all
+     * items should be present in each message
      *
      * @throws Exception
      */
@@ -473,9 +507,14 @@ public class Olingo2ComponentTest extends AbstractOlingo2TestSupport {
                 //
                 // Consumer endpoint
                 //
-                from("olingo2://read/Manufacturers?filterAlreadySeen=true&consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&consumer.splitResult=false").to("mock:consumer-alreadyseen");
+                from("olingo2://read/Manufacturers?filterAlreadySeen=true&consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&consumer.splitResult=false")
+                    .to("mock:consumer-alreadyseen");
+
+                from("olingo2://read/Manufacturers?consumer.splitResult=true")
+                    .to("mock:consumer-splitresult");
 
-                from("olingo2://read/Manufacturers?consumer.splitResult=true").to("mock:consumer-splitresult");
+                from("olingo2://read/Manufacturers('1')/Address?consumer.splitResult=true")
+                    .to("mock:consumer-value");
             }
         };
     }
diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Consumer.java b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Consumer.java
index 4cee0a5..8c72db4 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Consumer.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Consumer.java
@@ -29,6 +29,7 @@ import org.apache.camel.component.olingo4.internal.Olingo4ApiName;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.component.AbstractApiConsumer;
 import org.apache.camel.util.component.ApiConsumerHelper;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
 import org.apache.olingo.client.api.domain.ClientEntity;
 import org.apache.olingo.client.api.domain.ClientEntitySet;
 import org.apache.olingo.client.api.domain.ClientValue;
@@ -156,7 +157,13 @@ public class Olingo4Consumer extends AbstractApiConsumer<Olingo4ApiName, Olingo4
                 }
                 splitResult.add(entity);
             }
-        } else if (result instanceof ClientEntity) {
+        } else if (result instanceof ClientValue && ((ClientValue) result).isCollection()) {
+            ClientValue value = (ClientValue) result;
+            ClientCollectionValue<ClientValue> collection = value.asCollection();
+            collection.forEach(v -> {
+                splitResult.add(v);
+            });
+        } else {
             splitResult.add(result);
         }
 
diff --git a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java
index dfafcbe..c7d0125 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java
@@ -34,6 +34,7 @@ import org.apache.olingo.client.api.domain.ClientEntitySet;
 import org.apache.olingo.client.api.domain.ClientPrimitiveValue;
 import org.apache.olingo.client.api.domain.ClientProperty;
 import org.apache.olingo.client.api.domain.ClientServiceDocument;
+import org.apache.olingo.client.api.domain.ClientValue;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.edm.Edm;
 import org.apache.olingo.commons.api.ex.ODataError;
@@ -466,6 +467,30 @@ public class Olingo4ComponentTest extends AbstractOlingo4TestSupport {
             }
         }
     }
+    /**
+     * Read value of the People object and split the results
+     * into individual messages
+     */
+    @Test
+    public void testConsumerReadClientValuesSplitResults() throws Exception {
+        final Map<String, Object> headers = new HashMap<>();
+        String endpoint = "olingo4://read/People('russellwhyte')/FavoriteFeature?consumer.splitResult=true";
+
+        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-splitresult-value");
+        mockEndpoint.expectedMinimumMessageCount(1);
+
+        final ClientValue resultValue = requestBodyAndHeaders(endpoint, null, headers);
+        assertIsInstanceOf(ClientValue.class, resultValue);
+
+        mockEndpoint.assertIsSatisfied();
+        //
+        // 1 individual message in the exchange
+        //
+        Object body = mockEndpoint.getExchanges().get(0).getIn().getBody();
+        assertIsInstanceOf(ClientPrimitiveValue.class, body);
+        ClientPrimitiveValue value = (ClientPrimitiveValue) body;
+        assertEquals("Feature1", value.toString());
+    }
 
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
@@ -522,9 +547,15 @@ public class Olingo4ComponentTest extends AbstractOlingo4TestSupport {
                 //
                 // Consumer endpoint
                 //
-                from("olingo4://read/People?filterAlreadySeen=true&consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&consumer.splitResult=false").to("mock:consumer-alreadyseen");
+                from("olingo4://read/People?filterAlreadySeen=true&consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&consumer.splitResult=false")
+                    .to("mock:consumer-alreadyseen");
+
+                from("olingo4://read/People?consumer.splitResult=true")
+                    .to("mock:consumer-splitresult");
+
+                from("olingo4://read/People('russellwhyte')/FavoriteFeature?consumer.splitResult=true")
+                    .to("mock:consumer-splitresult-value");
 
-                from("olingo4://read/People?consumer.splitResult=true").to("mock:consumer-splitresult");
             }
         };
     }


[camel] 04/04: fix(13606): Stop Olingo Index Classes generating NP Exceptions

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 8885525e92b6507079b16d3c3b4c4739d482774d
Author: phantomjinx <p....@phantomjinx.co.uk>
AuthorDate: Wed Jun 5 11:04:07 2019 +0100

    fix(13606): Stop Olingo Index Classes generating NP Exceptions
    
    * Olingo*Index
     * Provides null-checks to each method to avoid any NPE
    
    * Tests
     * The consumer testing routes were being started prior to the tests that
       concerned them. Consequently, it was hit/miss whether the tests would
       catch all messages generated by the routes. This matters for the
       'already seen' tests as adding more of there meant tests failed with
       messages having no bodies.
     * Consumer tests broken out into their own classes and camel context
       started in the test once the mock endpoints have been property setup.
---
 .../camel/component/olingo2/Olingo2Index.java      |  71 ++++++-
 .../olingo2/Olingo2ComponentConsumerTest.java      | 234 +++++++++++++++++++++
 ...Test.java => Olingo2ComponentProducerTest.java} | 148 +------------
 .../camel/component/olingo4/Olingo4Index.java      |  23 +-
 .../olingo4/Olingo4ComponentConsumerTest.java      | 211 +++++++++++++++++++
 ...Test.java => Olingo4ComponentProducerTest.java} | 134 +-----------
 6 files changed, 546 insertions(+), 275 deletions(-)

diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Index.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Index.java
index 1198a10..c6a0f2a 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Index.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Index.java
@@ -18,17 +18,47 @@ package org.apache.camel.component.olingo2;
 
 import java.lang.reflect.Array;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import org.apache.olingo.odata2.api.ep.entry.EntryMetadata;
 import org.apache.olingo.odata2.api.ep.entry.ODataEntry;
+import org.apache.olingo.odata2.api.ep.feed.FeedMetadata;
 import org.apache.olingo.odata2.api.ep.feed.ODataFeed;
 
 public class Olingo2Index {
 
     private Set<Integer> resultIndex = new HashSet<>();
 
+    private class EmptyODataFeed implements ODataFeed {
+
+        @Override
+        public List<ODataEntry> getEntries() {
+            return Collections.emptyList();
+        }
+
+        @Override
+        public FeedMetadata getFeedMetadata() {
+            return new FeedMetadata() {
+                @Override
+                public String getDeltaLink() {
+                    return null;
+                }
+
+                @Override
+                public Integer getInlineCount() {
+                    return 0;
+                }
+
+                @Override
+                public String getNextLink() {
+                    return null;
+                }
+            };
+        }
+    }
+
     /**
      * Hash only certain data since other parts change between message
      * exchanges.
@@ -64,18 +94,41 @@ public class Olingo2Index {
     }
 
     private Object filter(Object o) {
-        if (resultIndex.contains(o.hashCode())) {
+        if (o == null || resultIndex.contains(o.hashCode())) {
             return null;
         }
         return o;
     }
 
     private void indexDefault(Object o) {
+        if (o == null) {
+            return;
+        }
+
         resultIndex.add(o.hashCode());
     }
 
+    private Object filter(ODataEntry entry) {
+        if (entry == null || resultIndex.contains(hash(entry))) {
+            return null;
+        }
+        return entry;
+    }
+
+    private void index(ODataEntry entry) {
+        if (entry == null) {
+            return;
+        }
+
+        resultIndex.add(hash(entry));
+    }
+
     private Iterable<?> filter(Iterable<?> iterable) {
         List<Object> filtered = new ArrayList<>();
+        if (iterable == null) {
+            return filtered;
+        }
+
         for (Object o : iterable) {
             if (resultIndex.contains(o.hashCode())) {
                 continue;
@@ -87,12 +140,20 @@ public class Olingo2Index {
     }
 
     private void index(Iterable<?> iterable) {
+        if (iterable == null) {
+            return;
+        }
+
         for (Object o : iterable) {
             resultIndex.add(o.hashCode());
         }
     }
 
     private ODataFeed filter(ODataFeed odataFeed) {
+        if (odataFeed == null) {
+            return new EmptyODataFeed();
+        }
+
         List<ODataEntry> entries = odataFeed.getEntries();
 
         if (entries.isEmpty()) {
@@ -111,6 +172,10 @@ public class Olingo2Index {
     }
 
     private void index(ODataFeed odataFeed) {
+        if (odataFeed == null) {
+            return;
+        }
+
         for (ODataEntry entry : odataFeed.getEntries()) {
             resultIndex.add(hash(entry));
         }
@@ -124,6 +189,8 @@ public class Olingo2Index {
             index((ODataFeed) result);
         } else if (result instanceof Iterable) {
             index((Iterable<?>) result);
+        } else if (result instanceof ODataEntry) {
+            index((ODataEntry) result);
         } else {
             indexDefault(result);
         }
@@ -142,6 +209,8 @@ public class Olingo2Index {
                 result.add(Array.get(response, i));
             }
             response = filter(result);
+        } else if (response instanceof ODataEntry) {
+            response = filter((ODataEntry) response);
         } else {
             response = filter(response);
         }
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentConsumerTest.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentConsumerTest.java
new file mode 100644
index 0000000..e95c53e
--- /dev/null
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentConsumerTest.java
@@ -0,0 +1,234 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.olingo2;
+
+import java.util.Map;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.AvailablePortFinder;
+import org.apache.olingo.odata2.api.ep.entry.ODataEntry;
+import org.apache.olingo.odata2.api.ep.feed.ODataFeed;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Test class for {@link org.apache.camel.component.olingo2.api.Olingo2App} APIs.
+ * <p>
+ * The integration test runs against Apache Olingo 2.0 sample server
+ * which is dynamically installed and started during the test.
+ * </p>
+ */
+public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
+
+    private static final int PORT = AvailablePortFinder.getNextAvailable();
+    private static final String TEST_SERVICE_URL = "http://localhost:" + PORT + "/MyFormula.svc";
+
+    private static Olingo2SampleServer server;
+
+    public Olingo2ComponentConsumerTest() {
+        setDefaultTestProperty("serviceUri", "http://localhost:" + PORT + "/MyFormula.svc");
+    }
+
+    @BeforeClass
+    public static void beforeClass() throws Exception {
+        startServers(PORT);
+        Olingo2SampleServer.generateSampleData(TEST_SERVICE_URL);
+    }
+
+    @AfterClass
+    public static void afterClass() throws Exception {
+        if (server != null) {
+            server.stop();
+            server.destroy();
+        }
+    }
+
+    protected static void startServers(int port) throws Exception {
+        server = new Olingo2SampleServer(port, "/olingo2_ref");
+        server.start();
+    }
+
+    private void addRouteAndStartContext(RouteBuilder builder) throws Exception {
+        context().addRoutes(builder);
+        startCamelContext();
+    }
+
+    /**
+     * Read entity set of the People object
+     * and filter already seen items on subsequent exchanges
+     * Use a delay since the mock endpoint does not always get
+     * the correct number of exchanges before being satisfied.
+     *
+     * Note:
+     * - consumer.splitResults is set to false since this ensures the first returned message
+     *   contains all the results. This is preferred for the purposes of this test. The default
+     *   will mean the first n messages contain the results (where n is the result total) then
+     *   subsequent messages will be empty
+     */
+    @Test
+    public void testConsumerReadFilterAlreadySeen() throws Exception {
+        int expectedMsgCount = 3;
+        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-alreadyseen");
+        mockEndpoint.expectedMessageCount(expectedMsgCount);
+        mockEndpoint.setResultWaitTime(60000);
+
+        RouteBuilder builder = new RouteBuilder() {
+            public void configure() {
+                from("olingo2://read/Manufacturers?filterAlreadySeen=true&"
+                        + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&"
+                        + "consumer.splitResult=false")
+                    .to("mock:consumer-alreadyseen");
+            };
+        };
+        addRouteAndStartContext(builder);
+
+        mockEndpoint.assertIsSatisfied();
+
+        for (int i = 0; i < expectedMsgCount; ++i) {
+            Object body = mockEndpoint.getExchanges().get(i).getIn().getBody();
+
+            if (i == 0) {
+                //
+                // First polled messages contained all the manufacturers
+                //
+                assertTrue(body instanceof ODataFeed);
+                ODataFeed set = (ODataFeed) body;
+                assertTrue(set.getEntries().size() > 0);
+            } else {
+                //
+                // Subsequent polling messages should be empty
+                // since the filterAlreadySeen property is true
+                //
+                assertNull(body);
+            }
+        }
+    }
+
+    @Test
+    public void testConsumerReadFilterAlreadySeenWithPredicateAndSplitResults() throws Exception {
+        int expectedMsgCount = 3;
+        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-splitresult-kp-manufacturer");
+        mockEndpoint.expectedMinimumMessageCount(expectedMsgCount);
+
+        RouteBuilder builder = new RouteBuilder() {
+            public void configure() {
+                from("olingo2://read/Manufacturers('1')?filterAlreadySeen=true&"
+                        + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&"
+                        + "consumer.splitResult=true")
+                    .to("mock:consumer-splitresult-kp-manufacturer");
+            };
+        };
+        addRouteAndStartContext(builder);
+
+        mockEndpoint.assertIsSatisfied();
+
+        for (int i = 0; i < expectedMsgCount; ++i) {
+            Object body = mockEndpoint.getExchanges().get(i).getIn().getBody();
+
+            if (i == 0) {
+                //
+                // First polled messages contained all the entities
+                //
+                assertTrue(body instanceof ODataEntry);
+                ODataEntry entry = (ODataEntry) body;
+                Object nameValue = entry.getProperties().get("Name");
+                assertNotNull(nameValue);
+                assertEquals("Star Powered Racing", nameValue.toString());
+            } else {
+                //
+                // Subsequent polling messages should be empty
+                // since the filterAlreadySeen property is true
+                //
+                assertNull(body);
+            }
+        }
+    }
+
+    /**
+     * Read value of the People object and split the results
+     * into individual messages
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testConsumerReadClientValuesSplitResults() throws Exception {
+        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-value");
+        mockEndpoint.expectedMinimumMessageCount(1);
+        mockEndpoint.setResultWaitTime(60000);
+
+        RouteBuilder builder = new RouteBuilder() {
+            public void configure() {
+                from("olingo2://read/Manufacturers('1')/Address?consumer.splitResult=true")
+                    .to("mock:consumer-value");
+            };
+        };
+        addRouteAndStartContext(builder);
+
+        mockEndpoint.assertIsSatisfied();
+        //
+        // 1 individual message in the exchange
+        //
+        Object body = mockEndpoint.getExchanges().get(0).getIn().getBody();
+        assertIsInstanceOf(Map.class, body);
+        Map<String, Object> value = (Map<String, Object>) body;
+        Object addrObj = value.get("Address");
+        assertIsInstanceOf(Map.class, addrObj);
+        Map<String, Object> addrMap = (Map<String, Object>) addrObj;
+        assertEquals("70173", addrMap.get("ZipCode"));
+        assertEquals("Star Street 137", addrMap.get("Street"));
+        assertEquals("Germany", addrMap.get("Country"));
+        assertEquals("Stuttgart", addrMap.get("City"));
+    }
+
+    /**
+     * Read entity set of the Manufacturers object and split the results
+     * into individual messages
+     */
+    @Test
+    public void testConsumerReadSplitResults() throws Exception {
+        int expectedMsgCount = 2;
+        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-splitresult");
+        mockEndpoint.expectedMinimumMessageCount(expectedMsgCount);
+
+        RouteBuilder builder = new RouteBuilder() {
+            public void configure() {
+                from("olingo2://read/Manufacturers?consumer.splitResult=true")
+                    .to("mock:consumer-splitresult");
+            };
+        };
+
+        addRouteAndStartContext(builder);
+
+        mockEndpoint.assertIsSatisfied();
+
+        //
+        // 2 individual messages in the exchange,
+        // each containing a different entity.
+        //
+        for (int i = 0; i < expectedMsgCount; ++i) {
+            Object body = mockEndpoint.getExchanges().get(i).getIn().getBody();
+            assertTrue(body instanceof ODataEntry);
+            ODataEntry entry = (ODataEntry)body;
+            Map<String, Object> properties = entry.getProperties();
+            assertNotNull(properties);
+
+            Object name = properties.get("Name");
+            assertNotNull(name);
+            assertTrue(name.toString().contains("Powered Racing"));
+        }
+    }
+}
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentProducerTest.java
similarity index 73%
rename from components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java
rename to components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentProducerTest.java
index e544b79..589f2fd 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentProducerTest.java
@@ -49,10 +49,10 @@ import org.slf4j.LoggerFactory;
  * which is dynamically installed and started during the test.
  * </p>
  */
-public class Olingo2ComponentTest extends AbstractOlingo2TestSupport {
+public class Olingo2ComponentProducerTest extends AbstractOlingo2TestSupport {
 
-    private static final Logger LOG = LoggerFactory.getLogger(Olingo2ComponentTest.class);
-    private static final int PORT = AvailablePortFinder.getNextAvailable();  
+    private static final Logger LOG = LoggerFactory.getLogger(Olingo2ComponentProducerTest.class);
+    private static final int PORT = AvailablePortFinder.getNextAvailable();
     private static final String ID_PROPERTY = "Id";
     private static final String MANUFACTURERS = "Manufacturers";
     private static final String TEST_MANUFACTURER = "Manufacturers('1')";
@@ -66,7 +66,7 @@ public class Olingo2ComponentTest extends AbstractOlingo2TestSupport {
 
     private static Olingo2SampleServer server;
 
-    public Olingo2ComponentTest() {
+    public Olingo2ComponentProducerTest() {
         setDefaultTestProperty("serviceUri", "http://localhost:" + PORT + "/MyFormula.svc");
     }
 
@@ -248,89 +248,10 @@ public class Olingo2ComponentTest extends AbstractOlingo2TestSupport {
     }
 
     /**
-     * Read entity set of the People object
-     * and filter already seen items on subsequent exchanges
-     * Use a delay since the mock endpoint does not always get
-     * the correct number of exchanges before being satisfied.
      *
-     * Note:
-     * - consumer.splitResults is set to false since this ensures the first returned message
-     *   contains all the results. This is preferred for the purposes of this test. The default
-     *   will mean the first n messages contain the results (where n is the result total) then
-     *   subsequent messages will be empty
-     */
-    @Test
-    public void testConsumerReadFilterAlreadySeen() throws Exception {
-        final Map<String, Object> headers = new HashMap<>();
-        String endpoint = "olingo2://read/Manufacturers?filterAlreadySeen=true&consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&consumer.splitResult=false";
-
-        int expectedMsgCount = 3;
-        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-alreadyseen");
-        mockEndpoint.expectedMessageCount(expectedMsgCount);
-        mockEndpoint.setResultWaitTime(60000);
-
-        final ODataFeed manufacturers = (ODataFeed)requestBodyAndHeaders(endpoint, null, headers);
-        assertNotNull(manufacturers);
-        int expectedManufacturers = manufacturers.getEntries().size();
-
-        mockEndpoint.assertIsSatisfied();
-
-        for (int i = 0; i < expectedMsgCount; ++i) {
-            Object body = mockEndpoint.getExchanges().get(i).getIn().getBody();
-
-            if (i == 0) {
-                //
-                // First polled messages contained all the manufacturers
-                //
-                assertTrue(body instanceof ODataFeed);
-                ODataFeed set = (ODataFeed) body;
-                assertEquals(expectedManufacturers, set.getEntries().size());
-            } else {
-                //
-                // Subsequent polling messages should be empty
-                // since the filterAlreadySeen property is true
-                //
-                assertNull(body);
-            }
-        }
-    }
-
-    /**
-     * Read value of the People object and split the results
-     * into individual messages
-     */
-    @Test
-    public void testConsumerReadClientValuesSplitResults() throws Exception {
-        final Map<String, Object> headers = new HashMap<>();
-        String endpoint = "olingo2://read/Manufacturers('1')/Address?consumer.splitResult=true";
-
-        this.context.setTracing(true);
-        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-value");
-        mockEndpoint.expectedMinimumMessageCount(1);
-        mockEndpoint.setResultWaitTime(60000);
-
-        final Map<String, Object> resultValue = requestBodyAndHeaders(endpoint, null, headers);
-        assertNotNull(resultValue);
-
-        mockEndpoint.assertIsSatisfied();
-        //
-        // 1 individual message in the exchange
-        //
-        Object body = mockEndpoint.getExchanges().get(0).getIn().getBody();
-        assertIsInstanceOf(Map.class, body);
-        Map<String, Object> value = (Map<String, Object>) body;
-        Object addrObj = value.get("Address");
-        assertIsInstanceOf(Map.class, addrObj);
-        Map<String, Object> addrMap = (Map<String, Object>) addrObj;
-        assertEquals("70173", addrMap.get("ZipCode"));
-        assertEquals("Star Street 137", addrMap.get("Street"));
-        assertEquals("Germany", addrMap.get("Country"));
-        assertEquals("Stuttgart", addrMap.get("City"));
-    }
-
-    /**
-     * Read entity set of the People object and with no filter already seen, all
-     * items should be present in each message
+     * Read entity set of the People object
+     * and with no filter already seen, all items
+     * should be present in each message
      *
      * @throws Exception
      */
@@ -410,49 +331,6 @@ public class Olingo2ComponentTest extends AbstractOlingo2TestSupport {
         }
     }
 
-    /**
-     * Read entity set of the Manufacturers object and split the results
-     * into individual messages
-     */
-    @Test
-    public void testConsumerReadSplitResults() throws Exception {
-        final Map<String, Object> headers = new HashMap<>();
-        String endpoint = "olingo2://read/Manufacturers?consumer.splitResult=true";
-
-        int expectedMsgCount = 2;
-        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-splitresult");
-        mockEndpoint.expectedMessageCount(expectedMsgCount);
-
-        final ODataFeed odataFeed = (ODataFeed)requestBodyAndHeaders(endpoint, null, headers);
-        assertNotNull(odataFeed);
-
-        mockEndpoint.assertIsSatisfied();
-
-        //
-        // 2 individual messages in the exchange,
-        // each containing a different entity.
-        //
-        for (int i = 0; i < expectedMsgCount; ++i) {
-            Object body = mockEndpoint.getExchanges().get(i).getIn().getBody();
-            assertTrue(body instanceof ODataEntry);
-            ODataEntry entry = (ODataEntry)body;
-            Map<String, Object> properties = entry.getProperties();
-            assertNotNull(properties);
-
-            Object name = properties.get("Name");
-            assertNotNull(name);
-            switch(i) {
-            case 0:
-                assertEquals("Star Powered Racing", name);
-                break;
-            case 1:
-                assertEquals("Horse Powered Racing", name);
-                break;
-            default:
-            }
-        }
-    }
-
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
@@ -500,18 +378,6 @@ public class Olingo2ComponentTest extends AbstractOlingo2TestSupport {
                 from("direct:read-people-filterseen")
                     .to("olingo2://read/Manufacturers?filterAlreadySeen=true")
                     .to("mock:producer-alreadyseen");
-
-                //
-                // Consumer endpoint
-                //
-                from("olingo2://read/Manufacturers?filterAlreadySeen=true&consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&consumer.splitResult=false")
-                    .to("mock:consumer-alreadyseen");
-
-                from("olingo2://read/Manufacturers?consumer.splitResult=true")
-                    .to("mock:consumer-splitresult");
-
-                from("olingo2://read/Manufacturers('1')/Address?consumer.splitResult=true")
-                    .to("mock:consumer-value");
             }
         };
     }
diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Index.java b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Index.java
index c00adbb..d4db500 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Index.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Index.java
@@ -23,24 +23,33 @@ import java.util.List;
 import java.util.Set;
 import org.apache.olingo.client.api.domain.ClientEntity;
 import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.core.domain.ClientEntitySetImpl;
 
 public class Olingo4Index {
 
     private Set<Integer> resultIndex = new HashSet<>();
 
     private Object filter(Object o) {
-        if (resultIndex.contains(o.hashCode())) {
+        if (o == null || resultIndex.contains(o.hashCode())) {
             return null;
         }
         return o;
     }
 
     private void indexDefault(Object o) {
+        if (o == null) {
+            return;
+        }
+
         resultIndex.add(o.hashCode());
     }
 
     private Iterable<?> filter(Iterable<?> iterable) {
         List<Object> filtered = new ArrayList<>();
+        if (iterable == null) {
+            return filtered;
+        }
+
         for (Object o : iterable) {
             if (resultIndex.contains(o.hashCode())) {
                 continue;
@@ -52,12 +61,20 @@ public class Olingo4Index {
     }
 
     private void index(Iterable<?> iterable) {
+        if (iterable == null) {
+            return;
+        }
+
         for (Object o : iterable) {
             resultIndex.add(o.hashCode());
         }
     }
 
     private ClientEntitySet filter(ClientEntitySet entitySet) {
+        if (entitySet == null) {
+            return new ClientEntitySetImpl();
+        }
+
         List<ClientEntity> entities = entitySet.getEntities();
 
         if (entities.isEmpty()) {
@@ -77,6 +94,10 @@ public class Olingo4Index {
     }
 
     private void index(ClientEntitySet entitySet) {
+        if (entitySet == null) {
+            return;
+        }
+
         for (ClientEntity entity : entitySet.getEntities()) {
             resultIndex.add(entity.hashCode());
         }
diff --git a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentConsumerTest.java b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentConsumerTest.java
new file mode 100644
index 0000000..ebf1b0f
--- /dev/null
+++ b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentConsumerTest.java
@@ -0,0 +1,211 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.olingo4;
+
+import java.util.Iterator;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientPrimitiveValue;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.junit.Test;
+
+public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
+
+    private static final String PEOPLE = "People";
+    private static final String TEST_PEOPLE = "People('russellwhyte')";
+    private static final String AIRPORTS = "Airports";
+
+    public Olingo4ComponentConsumerTest() {
+        setUseRouteBuilder(false);
+    }
+
+    @Override
+    public boolean isCreateCamelContextPerClass() {
+        return false;
+    }
+
+    private void addRouteAndStartContext(RouteBuilder builder) throws Exception {
+        context().addRoutes(builder);
+        startCamelContext();
+    }
+
+    /**
+     * Read entity set of the People object
+     * and filter already seen items on subsequent exchanges
+     * Use a delay since the mock endpoint does not always get
+     * the correct number of exchanges before being satisfied.
+     *
+     * Note:
+     * - consumer.splitResults is set to false since this ensures the first returned message
+     *   contains all the results. This is preferred for the purposes of this test. The default
+     *   will mean the first n messages contain the results (where n is the result total) then
+     *   subsequent messages will be empty
+     */
+    @Test
+    public void testConsumerReadFilterAlreadySeen() throws Exception {
+        int expectedEntities = 20;
+        int expectedMsgCount = 3;
+        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-alreadyseen");
+        mockEndpoint.expectedMinimumMessageCount(expectedMsgCount);
+
+        RouteBuilder builder = new RouteBuilder() {
+            public void configure() {
+                from("olingo4://read/" + PEOPLE + "?consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&consumer.splitResult=false&filterAlreadySeen=true")
+                    .to("mock:consumer-alreadyseen");
+            };
+        };
+        addRouteAndStartContext(builder);
+
+        mockEndpoint.assertIsSatisfied();
+
+        for (int i = 0; i < expectedMsgCount; ++i) {
+            Object body = mockEndpoint.getExchanges().get(i).getIn().getBody();
+
+            if (i == 0) {
+                //
+                // First polled messages contained all the entities
+                //
+                assertTrue(body instanceof ClientEntitySet);
+                ClientEntitySet set = (ClientEntitySet) body;
+                assertEquals(expectedEntities, set.getEntities().size());
+            } else {
+                //
+                // Subsequent polling messages should be empty
+                // since the filterAlreadySeen property is true
+                //
+                assertNull(body);
+            }
+        }
+    }
+
+    @Test
+    public void testConsumerReadFilterAlreadySeenWithPredicateAndSplitResults() throws Exception {
+        int expectedMsgCount = 3;
+        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-splitresult-kp-airport");
+        mockEndpoint.expectedMinimumMessageCount(expectedMsgCount);
+
+        RouteBuilder builder = new RouteBuilder() {
+            public void configure() {
+                from("olingo4://read/" + AIRPORTS + "('KSFO')"
+                        + "?filterAlreadySeen=true&"
+                        + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&"
+                        + "consumer.splitResult=true")
+                    .to("mock:consumer-splitresult-kp-airport");
+            };
+        };
+        addRouteAndStartContext(builder);
+
+        mockEndpoint.assertIsSatisfied();
+
+        for (int i = 0; i < expectedMsgCount; ++i) {
+            Object body = mockEndpoint.getExchanges().get(i).getIn().getBody();
+
+            if (i == 0) {
+                //
+                // First polled messages contained all the entities
+                //
+                assertTrue(body instanceof ClientEntity);
+                ClientEntity ksfoEntity = (ClientEntity) body;
+                ClientProperty nameProp = ksfoEntity.getProperty("Name");
+                assertNotNull(nameProp);
+                assertEquals("San Francisco International Airport", nameProp.getValue().toString());
+            } else {
+                //
+                // Subsequent polling messages should be empty
+                // since the filterAlreadySeen property is true
+                //
+                assertNull(body);
+            }
+        }
+    }
+
+    /**
+     * Read entity set of the People object and split the results
+     * into individual messages
+     */
+    @Test
+    public void testConsumerReadSplitResults() throws Exception {
+        int expectedMsgCount = 3;
+        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-splitresult");
+        mockEndpoint.expectedMinimumMessageCount(expectedMsgCount);
+
+        RouteBuilder builder = new RouteBuilder() {
+            public void configure() {
+                from("olingo4://read/" + PEOPLE + "?consumer.splitResult=true")
+                    .to("mock:consumer-splitresult");
+            };
+        };
+        addRouteAndStartContext(builder);
+
+        mockEndpoint.assertIsSatisfied();
+        //
+        // At least 3 individual messages in the exchange,
+        // each containing a different entity.
+        //
+        for (int i = 0; i < expectedMsgCount; ++i) {
+            Object body = mockEndpoint.getExchanges().get(i).getIn().getBody();
+            assertTrue(body instanceof ClientEntity);
+            ClientEntity entity = (ClientEntity)body;
+            ClientProperty nameProperty = entity.getProperty("UserName");
+            assertNotNull(nameProperty);
+
+            switch(i) {
+            case 0:
+                assertEquals("russellwhyte", nameProperty.getValue().toString());
+                break;
+            case 1:
+                assertEquals("scottketchum", nameProperty.getValue().toString());
+                break;
+            case 2:
+                assertEquals("ronaldmundy", nameProperty.getValue().toString());
+                break;
+            default:
+            }
+        }
+    }
+
+    /**
+     * Read value of the People object and split the results
+     * into individual messages
+     */
+    @Test
+    public void testConsumerReadClientValuesSplitResults() throws Exception {
+        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-splitresult-value");
+        mockEndpoint.expectedMinimumMessageCount(1);
+
+        RouteBuilder builder = new RouteBuilder() {
+            public void configure() {
+                from("olingo4://read/" + TEST_PEOPLE + "/FavoriteFeature?consumer.splitResult=true")
+                    .to("mock:consumer-splitresult-value");
+            };
+        };
+        addRouteAndStartContext(builder);
+
+        mockEndpoint.assertIsSatisfied();
+        //
+        // 1 individual message in the exchange
+        //
+        Object body = mockEndpoint.getExchanges().get(0).getIn().getBody();
+        assertIsInstanceOf(ClientPrimitiveValue.class, body);
+        ClientPrimitiveValue value = (ClientPrimitiveValue) body;
+        assertEquals("Feature1", value.toString());
+    }
+}
diff --git a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentProducerTest.java
similarity index 78%
rename from components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java
rename to components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentProducerTest.java
index c7d0125..e28bbb3 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentTest.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentProducerTest.java
@@ -32,7 +32,6 @@ import org.apache.olingo.client.api.domain.ClientComplexValue;
 import org.apache.olingo.client.api.domain.ClientEntity;
 import org.apache.olingo.client.api.domain.ClientEntitySet;
 import org.apache.olingo.client.api.domain.ClientPrimitiveValue;
-import org.apache.olingo.client.api.domain.ClientProperty;
 import org.apache.olingo.client.api.domain.ClientServiceDocument;
 import org.apache.olingo.client.api.domain.ClientValue;
 import org.apache.olingo.commons.api.Constants;
@@ -52,9 +51,9 @@ import org.slf4j.LoggerFactory;
  * service published on http://services.odata.org/TripPinRESTierService.
  * </p>
  */
-public class Olingo4ComponentTest extends AbstractOlingo4TestSupport {
+public class Olingo4ComponentProducerTest extends AbstractOlingo4TestSupport {
 
-    private static final Logger LOG = LoggerFactory.getLogger(Olingo4ComponentTest.class);
+    private static final Logger LOG = LoggerFactory.getLogger(Olingo4ComponentProducerTest.class);
 
     private static final String PEOPLE = "People";
     private static final String TEST_PEOPLE = "People('russellwhyte')";
@@ -299,53 +298,6 @@ public class Olingo4ComponentTest extends AbstractOlingo4TestSupport {
     }
 
     /**
-     * Read entity set of the People object
-     * and filter already seen items on subsequent exchanges
-     * Use a delay since the mock endpoint does not always get
-     * the correct number of exchanges before being satisfied.
-     *
-     * Note:
-     * - consumer.splitResults is set to false since this ensures the first returned message
-     *   contains all the results. This is preferred for the purposes of this test. The default
-     *   will mean the first n messages contain the results (where n is the result total) then
-     *   subsequent messages will be empty
-     */
-    @Test
-    public void testConsumerReadFilterAlreadySeen() throws Exception {
-        final Map<String, Object> headers = new HashMap<>();
-        String endpoint = "olingo4://read/People?filterAlreadySeen=true&consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&consumer.splitResult=false";
-        int expectedEntities = 20;
-        int expectedMsgCount = 3;
-        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-alreadyseen");
-        mockEndpoint.expectedMessageCount(expectedMsgCount);
-
-        final ClientEntitySet entities = (ClientEntitySet)requestBodyAndHeaders(endpoint, null, headers);
-        assertNotNull(entities);
-        assertEquals(expectedEntities, entities.getEntities().size());
-
-        mockEndpoint.assertIsSatisfied();
-
-        for (int i = 0; i < expectedMsgCount; ++i) {
-            Object body = mockEndpoint.getExchanges().get(i).getIn().getBody();
-
-            if (i == 0) {
-                //
-                // First polled messages contained all the entities
-                //
-                assertTrue(body instanceof ClientEntitySet);
-                ClientEntitySet set = (ClientEntitySet) body;
-                assertEquals(expectedEntities, set.getEntities().size());
-            } else {
-                //
-                // Subsequent polling messages should be empty
-                // since the filterAlreadySeen property is true
-                //
-                assertNull(body);
-            }
-        }
-    }
-
-    /**
      *
      * Read entity set of the People object
      * and with no filter already seen, all items
@@ -423,75 +375,6 @@ public class Olingo4ComponentTest extends AbstractOlingo4TestSupport {
         }
     }
 
-    /**
-     * Read entity set of the People object and split the results
-     * into individual messages
-     */
-    @Test
-    public void testConsumerReadSplitResults() throws Exception {
-        final Map<String, Object> headers = new HashMap<>();
-        String endpoint = "olingo4://read/People?consumer.splitResult=true";
-        int expectedEntities = 20;
-
-        int expectedMsgCount = 3;
-        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-splitresult");
-        mockEndpoint.expectedMinimumMessageCount(expectedMsgCount);
-
-        final ClientEntitySet entities = (ClientEntitySet)requestBodyAndHeaders(endpoint, null, headers);
-        assertNotNull(entities);
-        assertEquals(expectedEntities, entities.getEntities().size());
-
-        mockEndpoint.assertIsSatisfied();
-        //
-        // At least 3 individual messages in the exchange,
-        // each containing a different entity.
-        //
-        for (int i = 0; i < expectedMsgCount; ++i) {
-            Object body = mockEndpoint.getExchanges().get(i).getIn().getBody();
-            assertTrue(body instanceof ClientEntity);
-            ClientEntity entity = (ClientEntity)body;
-            ClientProperty nameProperty = entity.getProperty("UserName");
-            assertNotNull(nameProperty);
-
-            switch(i) {
-            case 0:
-                assertEquals("russellwhyte", nameProperty.getValue().toString());
-                break;
-            case 1:
-                assertEquals("scottketchum", nameProperty.getValue().toString());
-                break;
-            case 2:
-                assertEquals("ronaldmundy", nameProperty.getValue().toString());
-                break;
-            default:
-            }
-        }
-    }
-    /**
-     * Read value of the People object and split the results
-     * into individual messages
-     */
-    @Test
-    public void testConsumerReadClientValuesSplitResults() throws Exception {
-        final Map<String, Object> headers = new HashMap<>();
-        String endpoint = "olingo4://read/People('russellwhyte')/FavoriteFeature?consumer.splitResult=true";
-
-        MockEndpoint mockEndpoint = getMockEndpoint("mock:consumer-splitresult-value");
-        mockEndpoint.expectedMinimumMessageCount(1);
-
-        final ClientValue resultValue = requestBodyAndHeaders(endpoint, null, headers);
-        assertIsInstanceOf(ClientValue.class, resultValue);
-
-        mockEndpoint.assertIsSatisfied();
-        //
-        // 1 individual message in the exchange
-        //
-        Object body = mockEndpoint.getExchanges().get(0).getIn().getBody();
-        assertIsInstanceOf(ClientPrimitiveValue.class, body);
-        ClientPrimitiveValue value = (ClientPrimitiveValue) body;
-        assertEquals("Feature1", value.toString());
-    }
-
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
@@ -543,19 +426,6 @@ public class Olingo4ComponentTest extends AbstractOlingo4TestSupport {
                 from("direct:read-people-filterseen")
                     .to("olingo4://read/People?filterAlreadySeen=true")
                     .to("mock:producer-alreadyseen");
-
-                //
-                // Consumer endpoint
-                //
-                from("olingo4://read/People?filterAlreadySeen=true&consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&consumer.splitResult=false")
-                    .to("mock:consumer-alreadyseen");
-
-                from("olingo4://read/People?consumer.splitResult=true")
-                    .to("mock:consumer-splitresult");
-
-                from("olingo4://read/People('russellwhyte')/FavoriteFeature?consumer.splitResult=true")
-                    .to("mock:consumer-splitresult-value");
-
             }
         };
     }


[camel] 01/04: Regen

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 63fbe63d9e816224ea6e953bedcaf181057d65a3
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jun 6 09:02:49 2019 +0200

    Regen
---
 camel-core/readme.adoc                | 82 +++++++++++++++++++++++++++--
 components/readme.adoc                | 98 +++++++++++------------------------
 docs/components/modules/ROOT/nav.adoc |  2 +-
 3 files changed, 110 insertions(+), 72 deletions(-)

diff --git a/camel-core/readme.adoc b/camel-core/readme.adoc
index 663462d..601cc9a 100644
--- a/camel-core/readme.adoc
+++ b/camel-core/readme.adoc
@@ -6,18 +6,90 @@ Components
 
 
 // components: START
-Number of Components: 2 in 1 JAR artifacts (1 deprecated)
+Number of Components: 26 in 1 JAR artifacts (1 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
 | Component | Available From | Description
 
+| link:src/main/docs/bean-component.adoc[Bean] (camel-core) +
+`bean:beanName` | 1.0 | The bean component is for invoking Java beans from Camel.
+
 | link:src/main/docs/binding-component.adoc[Binding] (camel-core) +
 `binding:bindingName:delegateUri` | 2.11 | *deprecated* The binding component is used for as a of wrapping an Endpoint in a contract with a data format.
 
+| link:src/main/docs/browse-component.adoc[Browse] (camel-core) +
+`browse:name` | 1.3 | The browse component is used for viewing the messages received on endpoints that supports BrowsableEndpoint.
+
+| link:src/main/docs/class-component.adoc[Class] (camel-core) +
+`class:beanName` | 2.4 | The Class Component is for invoking Java Classes (Java beans) from Camel.
+
+| link:src/main/docs/controlbus-component.adoc[Control Bus] (camel-core) +
+`controlbus:command:language` | 2.11 | The controlbus component provides easy management of Camel applications based on the Control Bus EIP pattern.
+
+| link:src/main/docs/dataformat-component.adoc[Data Format] (camel-core) +
+`dataformat:name:operation` | 2.12 | The dataformat component is used for working with Data Formats as if it was a regular Component supporting Endpoints and URIs.
+
+| link:src/main/docs/dataset-component.adoc[Dataset] (camel-core) +
+`dataset:name` | 1.3 | The dataset component provides a mechanism to easily perform load & soak testing of your system.
+
+| link:src/main/docs/direct-component.adoc[Direct] (camel-core) +
+`direct:name` | 1.0 | The direct component provides direct, synchronous call to another endpoint from the same CamelContext.
+
+| link:src/main/docs/direct-vm-component.adoc[Direct VM] (camel-core) +
+`direct-vm:name` | 2.10 | The direct-vm component provides direct, synchronous call to another endpoint from any CamelContext in the same JVM.
+
+| link:src/main/docs/file-component.adoc[File] (camel-core) +
+`file:directoryName` | 1.0 | The file component is used for reading or writing files.
+
+| link:src/main/docs/language-component.adoc[Language] (camel-core) +
+`language:languageName:resourceUri` | 2.5 | The language component allows you to send a message to an endpoint which executes a script by any of the supported Languages in Camel.
+
+| link:src/main/docs/log-component.adoc[Log] (camel-core) +
+`log:loggerName` | 1.1 | The log component logs message exchanges to the underlying logging mechanism.
+
+| link:src/main/docs/mock-component.adoc[Mock] (camel-core) +
+`mock:name` | 1.0 | The mock component is used for testing routes and mediation rules using mocks.
+
+| link:src/main/docs/properties-component.adoc[Properties] (camel-core) +
+`properties:key` | 2.3 | The properties component is used for using property placeholders in endpoint uris.
+
+| link:src/main/docs/ref-component.adoc[Ref] (camel-core) +
+`ref:name` | 1.2 | The ref component is used for lookup of existing endpoints bound in the Registry.
+
+| link:src/main/docs/rest-component.adoc[REST] (camel-core) +
+`rest:method:path:uriTemplate` | 2.14 | The rest component is used for either hosting REST services (consumer) or calling external REST services (producer).
+
+| link:src/main/docs/rest-api-component.adoc[REST API] (camel-core) +
+`rest-api:path/contextIdPattern` | 2.16 | The rest-api component is used for providing Swagger API of the REST services which has been defined using the rest-dsl in Camel.
+
+| link:src/main/docs/saga-component.adoc[Saga] (camel-core) +
+`saga:action` | 2.21 | The saga component provides access to advanced options for managing the flow in the Saga EIP.
+
+| link:src/main/docs/scheduler-component.adoc[Scheduler] (camel-core) +
+`scheduler:name` | 2.15 | The scheduler component is used for generating message exchanges when a scheduler fires.
+
+| link:src/main/docs/seda-component.adoc[SEDA] (camel-core) +
+`seda:name` | 1.1 | The seda component provides asynchronous call to another endpoint from any CamelContext in the same JVM.
+
+| link:src/main/docs/stub-component.adoc[Stub] (camel-core) +
+`stub:name` | 2.10 | The stub component provides a simple way to stub out any physical endpoints while in development or testing.
+
 | link:src/main/docs/test-component.adoc[Test] (camel-core) +
 `test:name` | 1.3 | The test component extends the mock component by on startup to pull messages from another endpoint to set the expected message bodies.
 
+| link:src/main/docs/timer-component.adoc[Timer] (camel-core) +
+`timer:timerName` | 1.0 | The timer component is used for generating message exchanges when a timer fires.
+
+| link:src/main/docs/validator-component.adoc[Validator] (camel-core) +
+`validator:resourceUri` | 1.1 | Validates the payload of a message using XML Schema and JAXP Validation.
+
+| link:src/main/docs/vm-component.adoc[VM] (camel-core) +
+`vm:name` | 1.1 | The vm component provides asynchronous call to another endpoint from the same CamelContext.
+
+| link:src/main/docs/xslt-component.adoc[XSLT] (camel-core) +
+`xslt:resourceUri` | 1.3 | Transforms the message using a XSLT template.
+
 |===
 // components: END
 
@@ -34,7 +106,7 @@ Data Formats
 
 
 // dataformats: START
-Number of Data Formats: 4 in 42 JAR artifacts (6 deprecated)
+Number of Data Formats: 4 in 39 JAR artifacts (5 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
@@ -64,12 +136,14 @@ Expression Languages
 
 
 // languages: START
-Number of Languages: 8 in 1 JAR artifacts (0 deprecated)
+Number of Languages: 10 in 1 JAR artifacts (0 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
 | Language | Available From | Description
 
+| link:src/main/docs/bean-language.adoc[Bean method] (camel-core) | 1.3 | To use a Java bean (aka method call) in Camel expressions or predicates.
+
 | link:src/main/docs/constant-language.adoc[Constant] (camel-core) | 1.5 | To use a constant value in Camel expressions or predicates.
 
 | link:src/main/docs/exchangeProperty-language.adoc[ExchangeProperty] (camel-core) | 2.0 | To use a Camel Exchange property in expressions or predicates.
@@ -85,6 +159,8 @@ Number of Languages: 8 in 1 JAR artifacts (0 deprecated)
 | link:src/main/docs/tokenize-language.adoc[Tokenize] (camel-core) | 2.0 | To use Camel message body or header with a tokenizer in Camel expressions or predicates.
 
 | link:src/main/docs/xtokenize-language.adoc[XML Tokenize] (camel-core) | 2.14 | To use Camel message body or header with a XML tokenizer in Camel expressions or predicates.
+
+| link:src/main/docs/xpath-language.adoc[XPath] (camel-core) | 1.1 | To use XPath (XML) in Camel expressions or predicates.
 |===
 // languages: END
 
diff --git a/components/readme.adoc b/components/readme.adoc
index ab2781f..6ae13d7 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -2,15 +2,12 @@ Components
 ^^^^^^^^^^
 
 // components: START
-Number of Components: 321 in 242 JAR artifacts (24 deprecated)
+Number of Components: 311 in 211 JAR artifacts (24 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
 | Component | Available From | Description
 
-| link:camel-activemq/src/main/docs/activemq-component.adoc[ActiveMQ] (camel-activemq) +
-`activemq:destinationType:destinationName` | 1.0 | The activemq component allows messages to be sent to (or consumed from) Apache ActiveMQ. This component extends the Camel JMS component.
-
 | link:camel-ahc/src/main/docs/ahc-component.adoc[AHC] (camel-ahc) +
 `ahc:httpUri` | 2.8 | To call external HTTP services using Async Http Client.
 
@@ -80,12 +77,6 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-aws/src/main/docs/aws-ec2-component.adoc[AWS EC2] (camel-aws) +
 `aws-ec2:label` | 2.16 | The aws-ec2 is used for managing Amazon EC2 instances.
 
-| link:camel-aws-ecs/src/main/docs/aws-ecs-component.adoc[AWS ECS] (camel-aws-ecs) +
-`aws-ecs:label` | 3.0 | The aws-kms is used for managing Amazon ECS
-
-| link:camel-aws-eks/src/main/docs/aws-eks-component.adoc[AWS EKS] (camel-aws-eks) +
-`aws-eks:label` | 3.0 | The aws-kms is used for managing Amazon EKS
-
 | link:camel-aws/src/main/docs/aws-iam-component.adoc[AWS IAM] (camel-aws) +
 `aws-iam:label` | 2.23 | The aws-iam is used for managing Amazon IAM
 
@@ -104,9 +95,6 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-aws/src/main/docs/aws-mq-component.adoc[AWS MQ] (camel-aws) +
 `aws-mq:label` | 2.21 | The aws-mq is used for managing Amazon MQ instances.
 
-| link:camel-aws-msk/src/main/docs/aws-msk-component.adoc[AWS MSK] (camel-aws-msk) +
-`aws-msk:label` | 3.0 | The aws-kms is used for managing Amazon KMS
-
 | link:camel-aws/src/main/docs/aws-s3-component.adoc[AWS S3 Storage Service] (camel-aws) +
 `aws-s3:bucketNameOrArn` | 2.8 | The aws-s3 component is used for storing and retrieving objecct from Amazon S3 Storage Service.
 
@@ -131,7 +119,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-azure/src/main/docs/azure-queue-component.adoc[Azure Storage Queue Service] (camel-azure) +
 `azure-queue:containerAndQueueUri` | 2.19 | The azure-queue component is used for storing and retrieving messages from Azure Storage Queue Service.
 
-| link:camel-bean/src/main/docs/bean-component.adoc[Bean] (camel-bean) +
+| link:../camel-core/src/main/docs/bean-component.adoc[Bean] (camel-core) +
 `bean:beanName` | 1.0 | The bean component is for invoking Java beans from Camel.
 
 | link:camel-bean-validator/src/main/docs/bean-validator-component.adoc[Bean Validator] (camel-bean-validator) +
@@ -152,7 +140,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-braintree/src/main/docs/braintree-component.adoc[Braintree] (camel-braintree) +
 `braintree:apiName/methodName` | 2.17 | The braintree component is used for integrating with the Braintree Payment System.
 
-| link:camel-browse/src/main/docs/browse-component.adoc[Browse] (camel-browse) +
+| link:../camel-core/src/main/docs/browse-component.adoc[Browse] (camel-core) +
 `browse:name` | 1.3 | The browse component is used for viewing the messages received on endpoints that supports BrowsableEndpoint.
 
 | link:camel-caffeine/src/main/docs/caffeine-cache-component.adoc[Caffeine Cache] (camel-caffeine) +
@@ -167,17 +155,14 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-cassandraql/src/main/docs/cql-component.adoc[Cassandra CQL] (camel-cassandraql) +
 `cql:beanRef:hosts:port/keyspace` | 2.15 | The cql component aims at integrating Cassandra 2.0 using the CQL3 API (not the Thrift API).
 
-| link:camel-chatscript/src/main/docs/chatscript-component.adoc[ChatScript] (camel-chatscript) +
-`chatscript:host:port/botname` | 3.0 | Represents a ChatScript endpoint.
-
 | link:camel-chronicle/src/main/docs/chronicle-engine-component.adoc[Chronicle Engine] (camel-chronicle) +
 `chronicle-engine:addresses/path` | 2.18 | *deprecated* The camel chronicle-engine component let you leverage the power of OpenHFT's Chronicle-Engine.
 
 | link:camel-chunk/src/main/docs/chunk-component.adoc[Chunk] (camel-chunk) +
 `chunk:resourceUri` | 2.15 | Transforms the message using a Chunk template.
 
-| link:camel-bean/src/main/docs/class-component.adoc[Class] (camel-bean) +
-`class:beanName` | 2.4 | The class component is for invoking Java classes (Java beans) from Camel.
+| link:../camel-core/src/main/docs/class-component.adoc[Class] (camel-core) +
+`class:beanName` | 2.4 | The Class Component is for invoking Java Classes (Java beans) from Camel.
 
 | link:camel-cm-sms/src/main/docs/cm-sms-component.adoc[CM SMS Gateway] (camel-cm-sms) +
 `cm-sms:host` | 2.18 | The cm-sms component allows to integrate with CM SMS Gateway.
@@ -194,7 +179,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-consul/src/main/docs/consul-component.adoc[Consul] (camel-consul) +
 `consul:apiEndpoint` | 2.18 | The camel consul component allows you to work with Consul, a distributed, highly available, datacenter-aware, service discovery and configuration system.
 
-| link:camel-controlbus/src/main/docs/controlbus-component.adoc[Control Bus] (camel-controlbus) +
+| link:../camel-core/src/main/docs/controlbus-component.adoc[Control Bus] (camel-core) +
 `controlbus:command:language` | 2.11 | The controlbus component provides easy management of Camel applications based on the Control Bus EIP pattern.
 
 | link:camel-corda/src/main/docs/corda-component.adoc[corda] (camel-corda) +
@@ -218,22 +203,19 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-cxf/src/main/docs/cxfrs-component.adoc[CXF-RS] (camel-cxf) +
 `cxfrs:beanId:address` | 2.0 | The cxfrs component is used for JAX-RS REST services using Apache CXF.
 
-| link:camel-dataformat/src/main/docs/dataformat-component.adoc[Data Format] (camel-dataformat) +
+| link:../camel-core/src/main/docs/dataformat-component.adoc[Data Format] (camel-core) +
 `dataformat:name:operation` | 2.12 | The dataformat component is used for working with Data Formats as if it was a regular Component supporting Endpoints and URIs.
 
-| link:camel-dataset/src/main/docs/dataset-component.adoc[Dataset] (camel-dataset) +
+| link:../camel-core/src/main/docs/dataset-component.adoc[Dataset] (camel-core) +
 `dataset:name` | 1.3 | The dataset component provides a mechanism to easily perform load & soak testing of your system.
 
-| link:camel-dataset/src/main/docs/dataset-test-component.adoc[DataSet Test] (camel-dataset) +
-`dataset-test:name` | 1.3 | The dataset-test component extends the mock component by on startup to pull messages from another endpoint to set the expected message bodies.
-
 | link:camel-digitalocean/src/main/docs/digitalocean-component.adoc[DigitalOcean] (camel-digitalocean) +
 `digitalocean:operation` | 2.19 | The DigitalOcean component allows you to manage Droplets and resources within the DigitalOcean cloud.
 
-| link:camel-direct/src/main/docs/direct-component.adoc[Direct] (camel-direct) +
+| link:../camel-core/src/main/docs/direct-component.adoc[Direct] (camel-core) +
 `direct:name` | 1.0 | The direct component provides direct, synchronous call to another endpoint from the same CamelContext.
 
-| link:camel-directvm/src/main/docs/direct-vm-component.adoc[Direct VM] (camel-directvm) +
+| link:../camel-core/src/main/docs/direct-vm-component.adoc[Direct VM] (camel-core) +
 `direct-vm:name` | 2.10 | The direct-vm component provides direct, synchronous call to another endpoint from any CamelContext in the same JVM.
 
 | link:camel-disruptor/src/main/docs/disruptor-component.adoc[Disruptor] (camel-disruptor) +
@@ -287,7 +269,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-fhir/camel-fhir-component/src/main/docs/fhir-component.adoc[FHIR] (camel-fhir) +
 `fhir:apiName/methodName` | 2.23 | The fhir component is used for working with the FHIR protocol (health care).
 
-| link:camel-file/src/main/docs/file-component.adoc[File] (camel-file) +
+| link:../camel-core/src/main/docs/file-component.adoc[File] (camel-core) +
 `file:directoryName` | 1.0 | The file component is used for reading or writing files.
 
 | link:camel-flatpack/src/main/docs/flatpack-component.adoc[Flatpack] (camel-flatpack) +
@@ -506,9 +488,6 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-jolt/src/main/docs/jolt-component.adoc[JOLT] (camel-jolt) +
 `jolt:resourceUri` | 2.16 | The jolt component allows you to process a JSON messages using an JOLT specification (such as JSON-JSON transformation).
 
-| link:camel-jooq/src/main/docs/jooq-component.adoc[JOOQ] (camel-jooq) +
-`jooq:entityType` | 3.0 | The jooq component enables you to store and retrieve entities from databases using JOOQ
-
 | link:camel-jpa/src/main/docs/jpa-component.adoc[JPA] (camel-jpa) +
 `jpa:entityType` | 1.0 | The jpa component enables you to store and retrieve Java objects from databases using JPA.
 
@@ -572,7 +551,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-kubernetes/src/main/docs/kubernetes-services-component.adoc[Kubernetes Services] (camel-kubernetes) +
 `kubernetes-services:masterUrl` | 2.17 | The Kubernetes Service Accounts component provides a producer to execute service operations and a consumer to consume service events.
 
-| link:camel-language/src/main/docs/language-component.adoc[Language] (camel-language) +
+| link:../camel-core/src/main/docs/language-component.adoc[Language] (camel-core) +
 `language:languageName:resourceUri` | 2.5 | The language component allows you to send a message to an endpoint which executes a script by any of the supported Languages in Camel.
 
 | link:camel-ldap/src/main/docs/ldap-component.adoc[LDAP] (camel-ldap) +
@@ -584,7 +563,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-linkedin/camel-linkedin-component/src/main/docs/linkedin-component.adoc[Linkedin] (camel-linkedin) +
 `linkedin:apiName/methodName` | 2.14 | The linkedin component is used for retrieving LinkedIn user profiles, connections, companies, groups, posts, etc.
 
-| link:camel-log/src/main/docs/log-component.adoc[Log] (camel-log) +
+| link:../camel-core/src/main/docs/log-component.adoc[Log] (camel-core) +
 `log:loggerName` | 1.1 | The log component logs message exchanges to the underlying logging mechanism.
 
 | link:camel-lucene/src/main/docs/lucene-component.adoc[Lucene] (camel-lucene) +
@@ -614,7 +593,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-mllp/src/main/docs/mllp-component.adoc[MLLP] (camel-mllp) +
 `mllp:hostname:port` | 2.17 | Provides functionality required by Healthcare providers to communicate with other systems using the MLLP protocol.
 
-| link:camel-mock/src/main/docs/mock-component.adoc[Mock] (camel-mock) +
+| link:../camel-core/src/main/docs/mock-component.adoc[Mock] (camel-core) +
 `mock:name` | 1.0 | The mock component is used for testing routes and mediation rules using mocks.
 
 | link:camel-mongodb/src/main/docs/mongodb-component.adoc[MongoDB] (camel-mongodb) +
@@ -725,7 +704,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-printer/src/main/docs/lpr-component.adoc[Printer] (camel-printer) +
 `lpr:hostname:port/printername` | 2.1 | The printer component is used for sending messages to printers as print jobs.
 
-| link:camel-properties/src/main/docs/properties-component.adoc[Properties] (camel-properties) +
+| link:../camel-core/src/main/docs/properties-component.adoc[Properties] (camel-core) +
 `properties:key` | 2.3 | The properties component is used for using property placeholders in endpoint uris.
 
 | link:camel-pubnub/src/main/docs/pubnub-component.adoc[PubNub] (camel-pubnub) +
@@ -746,13 +725,13 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-reactive-streams/src/main/docs/reactive-streams-component.adoc[Reactive Streams] (camel-reactive-streams) +
 `reactive-streams:stream` | 2.19 | Reactive Camel using reactive streams
 
-| link:camel-ref/src/main/docs/ref-component.adoc[Ref] (camel-ref) +
+| link:../camel-core/src/main/docs/ref-component.adoc[Ref] (camel-core) +
 `ref:name` | 1.2 | The ref component is used for lookup of existing endpoints bound in the Registry.
 
-| link:camel-rest/src/main/docs/rest-component.adoc[REST] (camel-rest) +
+| link:../camel-core/src/main/docs/rest-component.adoc[REST] (camel-core) +
 `rest:method:path:uriTemplate` | 2.14 | The rest component is used for either hosting REST services (consumer) or calling external REST services (producer).
 
-| link:camel-rest/src/main/docs/rest-api-component.adoc[REST API] (camel-rest) +
+| link:../camel-core/src/main/docs/rest-api-component.adoc[REST API] (camel-core) +
 `rest-api:path/contextIdPattern` | 2.16 | The rest-api component is used for providing Swagger API of the REST services which has been defined using the rest-dsl in Camel.
 
 | link:camel-rest-swagger/src/main/docs/rest-swagger-component.adoc[REST Swagger] (camel-rest-swagger) +
@@ -770,7 +749,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-rss/src/main/docs/rss-component.adoc[RSS] (camel-rss) +
 `rss:feedUri` | 2.0 | The rss component is used for consuming RSS feeds.
 
-| link:camel-saga/src/main/docs/saga-component.adoc[Saga] (camel-saga) +
+| link:../camel-core/src/main/docs/saga-component.adoc[Saga] (camel-core) +
 `saga:action` | 2.21 | The saga component provides access to advanced options for managing the flow in the Saga EIP.
 
 | link:camel-salesforce/camel-salesforce-component/src/main/docs/salesforce-component.adoc[Salesforce] (camel-salesforce) +
@@ -779,7 +758,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-sap-netweaver/src/main/docs/sap-netweaver-component.adoc[SAP NetWeaver] (camel-sap-netweaver) +
 `sap-netweaver:url` | 2.12 | The sap-netweaver component integrates with the SAP NetWeaver Gateway using HTTP transports.
 
-| link:camel-scheduler/src/main/docs/scheduler-component.adoc[Scheduler] (camel-scheduler) +
+| link:../camel-core/src/main/docs/scheduler-component.adoc[Scheduler] (camel-core) +
 `scheduler:name` | 2.15 | The scheduler component is used for generating message exchanges when a scheduler fires.
 
 | link:camel-schematron/src/main/docs/schematron-component.adoc[Schematron] (camel-schematron) +
@@ -788,7 +767,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-jsch/src/main/docs/scp-component.adoc[SCP] (camel-jsch) +
 `scp:host:port/directoryName` | 2.10 | To copy files using the secure copy protocol (SCP).
 
-| link:camel-seda/src/main/docs/seda-component.adoc[SEDA] (camel-seda) +
+| link:../camel-core/src/main/docs/seda-component.adoc[SEDA] (camel-core) +
 `seda:name` | 1.1 | The seda component provides asynchronous call to another endpoint from any CamelContext in the same JVM.
 
 | link:camel-service/src/main/docs/service-component.adoc[Service] (camel-service) +
@@ -827,9 +806,6 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-solr/src/main/docs/solr-component.adoc[Solr] (camel-solr) +
 `solr:url` | 2.9 | The solr component allows you to interface with an Apache Lucene Solr server.
 
-| link:camel-soroush/src/main/docs/soroush-component.adoc[Soroush] (camel-soroush) +
-`soroush:endpoint/authorizationToken` | 3.0 | To integrate with the Soroush chat bot.
-
 | link:camel-spark-rest/src/main/docs/spark-rest-component.adoc[Spark Rest] (camel-spark-rest) +
 `spark-rest:verb:path` | 2.14 | The spark-rest component is used for hosting REST services which has been defined using Camel rest-dsl.
 
@@ -875,7 +851,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-stringtemplate/src/main/docs/string-template-component.adoc[String Template] (camel-stringtemplate) +
 `string-template:resourceUri` | 1.2 | Transforms the message using a String template.
 
-| link:camel-stub/src/main/docs/stub-component.adoc[Stub] (camel-stub) +
+| link:../camel-core/src/main/docs/stub-component.adoc[Stub] (camel-core) +
 `stub:name` | 2.10 | The stub component provides a simple way to stub out any physical endpoints while in development or testing.
 
 | link:camel-telegram/src/main/docs/telegram-component.adoc[Telegram] (camel-telegram) +
@@ -890,7 +866,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-tika/src/main/docs/tika-component.adoc[Tika] (camel-tika) +
 `tika:operation` | 2.19 | This component integrates with Apache Tika to extract content and metadata from thousands of file types.
 
-| link:camel-timer/src/main/docs/timer-component.adoc[Timer] (camel-timer) +
+| link:../camel-core/src/main/docs/timer-component.adoc[Timer] (camel-core) +
 `timer:timerName` | 1.0 | The timer component is used for generating message exchanges when a timer fires.
 
 | link:camel-twilio/src/main/docs/twilio-component.adoc[Twilio] (camel-twilio) +
@@ -914,7 +890,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-undertow/src/main/docs/undertow-component.adoc[Undertow] (camel-undertow) +
 `undertow:httpURI` | 2.16 | The undertow component provides HTTP and WebSocket based endpoints for consuming and producing HTTP/WebSocket requests.
 
-| link:camel-validator/src/main/docs/validator-component.adoc[Validator] (camel-validator) +
+| link:../camel-core/src/main/docs/validator-component.adoc[Validator] (camel-core) +
 `validator:resourceUri` | 1.1 | Validates the payload of a message using XML Schema and JAXP Validation.
 
 | link:camel-velocity/src/main/docs/velocity-component.adoc[Velocity] (camel-velocity) +
@@ -923,7 +899,7 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-vertx/src/main/docs/vertx-component.adoc[Vert.x] (camel-vertx) +
 `vertx:address` | 2.12 | The vertx component is used for sending and receive messages from a vertx event bus.
 
-| link:camel-vm/src/main/docs/vm-component.adoc[VM] (camel-vm) +
+| link:../camel-core/src/main/docs/vm-component.adoc[VM] (camel-core) +
 `vm:name` | 1.1 | The vm component provides asynchronous call to another endpoint from the same CamelContext.
 
 | link:camel-weather/src/main/docs/weather-component.adoc[Weather] (camel-weather) +
@@ -932,9 +908,6 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-web3j/src/main/docs/web3j-component.adoc[Web3j Ethereum Blockchain] (camel-web3j) +
 `web3j:nodeAddress` | 2.22 | The web3j component uses the Web3j client API and allows you to add/read nodes to/from a web3j compliant content repositories.
 
-| link:camel-webhook/src/main/docs/webhook-component.adoc[Webhook] (camel-webhook) +
-`webhook:endpointUri` | 3.0 | The webhook component allows other Camel components that can receive push notifications to expose webhook endpoints and automatically register them with their own webhook provider.
-
 | link:camel-wordpress/src/main/docs/wordpress-component.adoc[Wordpress] (camel-wordpress) +
 `wordpress:operationDetail` | 2.21 | Integrates Camel with Wordpress.
 
@@ -953,12 +926,9 @@ Number of Components: 321 in 242 JAR artifacts (24 deprecated)
 | link:camel-saxon/src/main/docs/xquery-component.adoc[XQuery] (camel-saxon) +
 `xquery:resourceUri` | 1.0 | Transforms the message using a XQuery template using Saxon.
 
-| link:camel-xslt/src/main/docs/xslt-component.adoc[XSLT] (camel-xslt) +
+| link:../camel-core/src/main/docs/xslt-component.adoc[XSLT] (camel-core) +
 `xslt:resourceUri` | 1.3 | Transforms the message using a XSLT template.
 
-| link:camel-yql/src/main/docs/yql-component.adoc[Yahoo Query Language] (camel-yql) +
-`yql:query` | 2.21 | The YQL (Yahoo! Query Language) platform enables you to query, filter, and combine data across the web.
-
 | link:camel-yammer/src/main/docs/yammer-component.adoc[Yammer] (camel-yammer) +
 `yammer:function` | 2.12 | The yammer component allows you to interact with the Yammer enterprise social network.
 
@@ -979,7 +949,7 @@ Data Formats
 ^^^^^^^^^^^^
 
 // dataformats: START
-Number of Data Formats: 53 in 42 JAR artifacts (6 deprecated)
+Number of Data Formats: 49 in 39 JAR artifacts (5 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
@@ -1017,8 +987,6 @@ Number of Data Formats: 53 in 42 JAR artifacts (6 deprecated)
 
 | link:../camel-core/src/main/docs/gzip-dataformat.adoc[GZip] (camel-core) | 2.0 | The GZip data format is a message compression and de-compression format (which works with the popular gzip/gunzip tools).
 
-| link:camel-zip-deflater/src/main/docs/gzipdeflater-dataformat.adoc[GZip Deflater] (camel-zip-deflater) | 2.0 | The GZip data format is a message compression and de-compression format (which works with the popular gzip/gunzip tools).
-
 | link:camel-hessian/src/main/docs/hessian-dataformat.adoc[Hessian] (camel-hessian) | 2.17 | *deprecated* Hessian data format is used for marshalling and unmarshalling messages using Cauchos Hessian format.
 
 | link:camel-hl7/src/main/docs/hl7-dataformat.adoc[HL7] (camel-hl7) | 2.0 | The HL7 data format can be used to marshal or unmarshal HL7 (Health Care) model objects.
@@ -1043,8 +1011,6 @@ Number of Data Formats: 53 in 42 JAR artifacts (6 deprecated)
 
 | link:camel-xstream/src/main/docs/json-xstream-dataformat.adoc[JSon XStream] (camel-xstream) | 2.0 | JSon data format is used for unmarshal a JSon payload to POJO or to marshal POJO back to JSon payload.
 
-| link:camel-jsonapi/src/main/docs/jsonApi-dataformat.adoc[jsonApi] (camel-jsonapi) | 3.0 | JsonApi data format is used for marshal and unmarshal Json API object.
-
 | link:camel-lzf/src/main/docs/lzf-dataformat.adoc[LZF Deflate Compression] (camel-lzf) | 2.17 | The LZF data format is a message compression and de-compression format (uses the LZF deflate algorithm).
 
 | link:camel-mail/src/main/docs/mime-multipart-dataformat.adoc[MIME Multipart] (camel-mail) | 2.17 | The MIME Multipart data format can marshal a Camel message with attachments into a Camel message having a MIME-Multipart message as message body (and no attachments), and vise-versa when unmarshalling.
@@ -1075,8 +1041,6 @@ Number of Data Formats: 53 in 42 JAR artifacts (6 deprecated)
 
 | link:camel-xmlbeans/src/main/docs/xmlBeans-dataformat.adoc[XML Beans] (camel-xmlbeans) | 1.2 | *deprecated* XML Beans data format is used for unmarshal a XML payload to POJO or to marshal POJO back to XML payload.
 
-| link:camel-xmljson/src/main/docs/xmljson-dataformat.adoc[XML JSon] (camel-xmljson) | 2.10 | *deprecated* XML JSon data format can convert from XML to JSON and vice-versa directly, without stepping through intermediate POJOs.
-
 | link:camel-xmlrpc/src/main/docs/xmlrpc-dataformat.adoc[XML RPC] (camel-xmlrpc) | 2.11 | The XML RPC data format is used for working with the XML RPC protocol.
 
 | link:camel-xmlsecurity/src/main/docs/secureXML-dataformat.adoc[XML Security] (camel-xmlsecurity) | 2.0 | The XML Security data format facilitates encryption and decryption of XML payloads.
@@ -1087,8 +1051,6 @@ Number of Data Formats: 53 in 42 JAR artifacts (6 deprecated)
 
 | link:../camel-core/src/main/docs/zip-dataformat.adoc[Zip Deflate Compression] (camel-core) | 2.12 | Zip Deflate Compression data format is a message compression and de-compression format (not zip files).
 
-| link:camel-zip-deflater/src/main/docs/zipdeflater-dataformat.adoc[Zip Deflate Compression] (camel-zip-deflater) | 2.12 | Zip Deflate Compression data format is a message compression and de-compression format (not zip files).
-
 | link:camel-zipfile/src/main/docs/zipfile-dataformat.adoc[Zip File] (camel-zipfile) | 2.11 | The Zip File data format is a message compression and de-compression format of zip files.
 |===
 // dataformats: END
@@ -1098,13 +1060,13 @@ Expression Languages
 ^^^^^^^^^^^^^^^^^^^^
 
 // languages: START
-Number of Languages: 24 in 14 JAR artifacts (7 deprecated)
+Number of Languages: 24 in 12 JAR artifacts (7 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
 | Language | Available From | Description
 
-| link:camel-bean/src/main/docs/bean-language.adoc[Bean method] (camel-bean) | 1.3 | To use a Java bean (aka method call) in Camel expressions or predicates.
+| link:../camel-core/src/main/docs/bean-language.adoc[Bean method] (camel-core) | 1.3 | To use a Java bean (aka method call) in Camel expressions or predicates.
 
 | link:../camel-core/src/main/docs/constant-language.adoc[Constant] (camel-core) | 1.5 | To use a constant value in Camel expressions or predicates.
 
@@ -1148,7 +1110,7 @@ Number of Languages: 24 in 14 JAR artifacts (7 deprecated)
 
 | link:../camel-core/src/main/docs/xtokenize-language.adoc[XML Tokenize] (camel-core) | 2.14 | To use Camel message body or header with a XML tokenizer in Camel expressions or predicates.
 
-| link:camel-xpath/src/main/docs/xpath-language.adoc[XPath] (camel-xpath) | 1.1 | To use XPath (XML) in Camel expressions or predicates.
+| link:../camel-core/src/main/docs/xpath-language.adoc[XPath] (camel-core) | 1.1 | To use XPath (XML) in Camel expressions or predicates.
 
 | link:camel-saxon/src/main/docs/xquery-language.adoc[XQuery] (camel-saxon) | 1.0 | To use XQuery (XML) in Camel expressions or predicates.
 |===
diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc
index 1cc553e..3845c76 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -1,7 +1,7 @@
 * xref:ahc-component.adoc[AHC Component]
+* xref:amqp-component.adoc[AMQP Component]
 * xref:ahc-ws-component.adoc[AHC Websocket Component]
 * xref:apns-component.adoc[APNS Component]
-* xref:amqp-component.adoc[AMQP Component]
 * xref:asn1-dataformat.adoc[ASN.1 File DataFormat]
 * xref:asterisk-component.adoc[Asterisk Component]
 * xref:atmos-component.adoc[Atmos Component]


[camel] 03/04: CAMEL-13316: Fixed CS for Olingo 2

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 91a29698d8767ec6ea7fce5c28e0b0ec733c542b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 20 15:26:52 2019 +0100

    CAMEL-13316: Fixed CS for Olingo 2
---
 .../java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java  | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java
index cdaa7e6..e544b79 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java
@@ -121,7 +121,6 @@ public class Olingo2ComponentTest extends AbstractOlingo2TestSupport {
         LOG.info("Manufacturer: {}", properties);
     }
 
-    @SuppressWarnings( "unchecked" )
     @Test
     public void testCreateUpdateDelete() throws Exception {
         final Map<String, Object> data = getEntityData();
@@ -164,7 +163,6 @@ public class Olingo2ComponentTest extends AbstractOlingo2TestSupport {
         return data;
     }
 
-    @SuppressWarnings( "unchecked" )
     @Test
     public void testBatch() throws Exception {
         final List<Olingo2BatchRequest> batchParts = new ArrayList<>();
@@ -301,7 +299,6 @@ public class Olingo2ComponentTest extends AbstractOlingo2TestSupport {
      * Read value of the People object and split the results
      * into individual messages
      */
-    @SuppressWarnings( "unchecked" )
     @Test
     public void testConsumerReadClientValuesSplitResults() throws Exception {
         final Map<String, Object> headers = new HashMap<>();