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/08/23 08:51:09 UTC

[camel] branch master updated (5add7e1 -> 7605794)

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

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


    from 5add7e1  Upgrade Flink to version 1.9.0
     new fe821ae  CAMEL-13598: Implement ETag support in olingo components
     new 998ea4d  Camel-Olingo2: Fixed CS
     new 7605794  Camel-Olingo4: Fixed CS

The 3 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/component/olingo2/api/Olingo2App.java    | 109 +++--
 .../olingo2/api/Olingo2ResponseHandler.java        |  18 +-
 .../api/batch/Olingo2BatchChangeRequest.java       |  10 +-
 .../api/batch/Olingo2BatchQueryRequest.java        |   6 +-
 .../olingo2/api/batch/Olingo2BatchResponse.java    |   4 +-
 .../component/olingo2/api/batch/Operation.java     |   5 +-
 .../olingo2/api/impl/AbstractFutureCallback.java   |  15 +-
 .../olingo2/api/impl/ODataPathSegmentImpl.java     |   3 +-
 .../component/olingo2/api/impl/Olingo2AppImpl.java | 471 ++++++++++-----------
 .../olingo2/api/impl/SystemQueryOption.java        |   2 +-
 .../olingo2/api/impl/UriInfoWithType.java          |   9 +-
 .../camel/component/olingo2/api/impl/UriType.java  |  14 +-
 .../camel-olingo2/camel-olingo2-component/pom.xml  |  11 +
 .../camel/component/olingo2/Olingo2AppWrapper.java |   5 +-
 .../camel/component/olingo2/Olingo2Component.java  |   7 +-
 .../component/olingo2/Olingo2Configuration.java    |  69 +--
 .../camel/component/olingo2/Olingo2Consumer.java   |  17 +-
 .../camel/component/olingo2/Olingo2Endpoint.java   |  28 +-
 .../camel/component/olingo2/Olingo2Index.java      |   2 +-
 .../camel/component/olingo2/Olingo2Producer.java   |  11 +-
 .../olingo2/AbstractOlingo2AppAPITestSupport.java  | 195 +++++++++
 .../olingo2/AbstractOlingo2TestSupport.java        |  13 +-
 .../olingo2/Olingo2AppAPIETagEnabledTest.java      | 238 +++++++++++
 .../camel/component/olingo2/Olingo2AppAPITest.java | 309 +++-----------
 .../olingo2/Olingo2ComponentConsumerTest.java      |  92 ++--
 .../olingo2/Olingo2ComponentProducerTest.java      |   5 +-
 .../camel/component/olingo2/Olingo2RouteTest.java  |  15 +-
 .../component/olingo2/Olingo2SampleServer.java     |   6 +-
 .../component/olingo2/etag-enabled-service.xml     |  45 ++
 .../camel/component/olingo4/api/Olingo4App.java    |  87 +++-
 .../olingo4/api/Olingo4ResponseHandler.java        |  18 +-
 .../olingo4/api/batch/Olingo4BatchRequest.java     |   4 +-
 .../component/olingo4/api/batch/Operation.java     |  11 +-
 .../olingo4/api/impl/AbstractFutureCallback.java   |  12 +-
 .../component/olingo4/api/impl/Olingo4AppImpl.java | 161 +++++--
 .../camel/component/olingo4/Olingo4AppAPITest.java | 154 ++++++-
 .../component/olingo4/Olingo4Configuration.java    |  69 +--
 .../camel/component/olingo4/Olingo4Consumer.java   |  21 +-
 .../camel/component/olingo4/Olingo4Endpoint.java   |   6 +-
 .../camel/component/olingo4/Olingo4Producer.java   |   8 +-
 .../olingo4/internal/Olingo4Constants.java         |   2 +-
 .../olingo4/Olingo4ComponentConsumerTest.java      | 109 ++---
 .../olingo4/Olingo4ComponentProducerTest.java      |   9 +-
 .../camel/component/olingo4/Olingo4RouteTest.java  |   4 +-
 44 files changed, 1488 insertions(+), 921 deletions(-)
 create mode 100644 components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/AbstractOlingo2AppAPITestSupport.java
 create mode 100644 components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPIETagEnabledTest.java
 create mode 100644 components/camel-olingo2/camel-olingo2-component/src/test/resources/org/apache/camel/component/olingo2/etag-enabled-service.xml


[camel] 02/03: Camel-Olingo2: Fixed CS

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

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

commit 998ea4d417e929f9035ea7a19e47aa48d1f537c7
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Aug 23 10:40:29 2019 +0200

    Camel-Olingo2: Fixed CS
---
 .../camel/component/olingo2/api/Olingo2App.java    | 109 ++++--
 .../olingo2/api/Olingo2ResponseHandler.java        |  18 +-
 .../api/batch/Olingo2BatchChangeRequest.java       |  10 +-
 .../api/batch/Olingo2BatchQueryRequest.java        |   6 +-
 .../olingo2/api/batch/Olingo2BatchResponse.java    |   4 +-
 .../component/olingo2/api/batch/Operation.java     |   5 +-
 .../olingo2/api/impl/AbstractFutureCallback.java   |  15 +-
 .../olingo2/api/impl/ODataPathSegmentImpl.java     |   3 +-
 .../component/olingo2/api/impl/Olingo2AppImpl.java | 436 ++++++++-------------
 .../olingo2/api/impl/SystemQueryOption.java        |   2 +-
 .../olingo2/api/impl/UriInfoWithType.java          |   9 +-
 .../camel/component/olingo2/api/impl/UriType.java  |  14 +-
 .../camel/component/olingo2/Olingo2AppWrapper.java |   5 +-
 .../camel/component/olingo2/Olingo2Component.java  |   7 +-
 .../component/olingo2/Olingo2Configuration.java    |  69 ++--
 .../camel/component/olingo2/Olingo2Consumer.java   |  17 +-
 .../camel/component/olingo2/Olingo2Endpoint.java   |  28 +-
 .../camel/component/olingo2/Olingo2Index.java      |   2 +-
 .../camel/component/olingo2/Olingo2Producer.java   |  11 +-
 .../olingo2/AbstractOlingo2AppAPITestSupport.java  |  29 +-
 .../olingo2/AbstractOlingo2TestSupport.java        |  13 +-
 .../olingo2/Olingo2AppAPIETagEnabledTest.java      | 131 +++----
 .../camel/component/olingo2/Olingo2AppAPITest.java | 134 +++----
 .../olingo2/Olingo2ComponentConsumerTest.java      |  92 ++---
 .../olingo2/Olingo2ComponentProducerTest.java      |   5 +-
 .../camel/component/olingo2/Olingo2RouteTest.java  |  15 +-
 .../component/olingo2/Olingo2SampleServer.java     |   6 +-
 .../component/olingo2/etag-enabled-service.xml     |  19 +
 28 files changed, 551 insertions(+), 663 deletions(-)

diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/Olingo2App.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/Olingo2App.java
index de7e551..d44d46a 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/Olingo2App.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/Olingo2App.java
@@ -31,36 +31,43 @@ public interface Olingo2App {
 
     /**
      * Sets Service base URI.
+     * 
      * @param serviceUri
      */
     void setServiceUri(String serviceUri);
 
     /**
      * Returns Service base URI.
+     * 
      * @return service base URI.
      */
     String getServiceUri();
 
     /**
      * Sets custom Http headers to add to every service request.
+     * 
      * @param httpHeaders custom Http headers.
      */
     void setHttpHeaders(Map<String, String> httpHeaders);
 
     /**
      * Returns custom Http headers.
+     * 
      * @return custom Http headers.
      */
     Map<String, String> getHttpHeaders();
 
     /**
-     * Returns content type for service calls. Defaults to <code>application/json;charset=utf-8</code>.
+     * Returns content type for service calls. Defaults to
+     * <code>application/json;charset=utf-8</code>.
+     * 
      * @return content type.
      */
     String getContentType();
 
     /**
      * Set default service call content type.
+     * 
      * @param contentType content type.
      */
     void setContentType(String contentType);
@@ -72,91 +79,111 @@ public interface Olingo2App {
 
     /**
      * Reads an OData resource and invokes callback with appropriate result.
-     * @param edm Service Edm, read from calling <code>read(null, "$metdata", null, responseHandler)</code>
+     * 
+     * @param edm Service Edm, read from calling
+     *            <code>read(null, "$metdata", null, responseHandler)</code>
      * @param resourcePath OData Resource path
-     * @param queryParams OData query params
-     *                    from http://www.odata.org/documentation/odata-version-2-0/uri-conventions#SystemQueryOptions
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
+     * @param queryParams OData query params from
+     *            http://www.odata.org/documentation/odata-version-2-0/uri-conventions#SystemQueryOptions
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
      * @param responseHandler callback handler
      */
-    <T> void read(Edm edm, String resourcePath, Map<String, String> queryParams,
-                  Map<String, String> endpointHttpHeaders,
-                  Olingo2ResponseHandler<T> responseHandler);
+    <T> void read(Edm edm, String resourcePath, Map<String, String> queryParams, Map<String, String> endpointHttpHeaders, Olingo2ResponseHandler<T> responseHandler);
 
     /**
-     * Reads an OData resource and invokes callback with the unparsed input stream.
-     * @param edm Service Edm, read from calling <code>read(null, "$metdata", null, responseHandler)</code>
+     * Reads an OData resource and invokes callback with the unparsed input
+     * stream.
+     * 
+     * @param edm Service Edm, read from calling
+     *            <code>read(null, "$metdata", null, responseHandler)</code>
      * @param resourcePath OData Resource path
-     * @param queryParams OData query params
-     *                    from http://www.odata.org/documentation/odata-version-2-0/uri-conventions#SystemQueryOptions
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
+     * @param queryParams OData query params from
+     *            http://www.odata.org/documentation/odata-version-2-0/uri-conventions#SystemQueryOptions
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
      * @param responseHandler callback handler
      */
-    void uread(Edm edm, String resourcePath, Map<String, String> queryParams,
-               Map<String, String> endpointHttpHeaders,
-               Olingo2ResponseHandler<InputStream> responseHandler);
+    void uread(Edm edm, String resourcePath, Map<String, String> queryParams, Map<String, String> endpointHttpHeaders, Olingo2ResponseHandler<InputStream> responseHandler);
 
     /**
-     * Deletes an OData resource and invokes callback
-     * with {@link org.apache.olingo.odata2.api.commons.HttpStatusCodes} on success, or with exception on failure.
+     * Deletes an OData resource and invokes callback with
+     * {@link org.apache.olingo.odata2.api.commons.HttpStatusCodes} on success,
+     * or with exception on failure.
+     * 
      * @param resourcePath resource path for Entry
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
-     * @param responseHandler {@link org.apache.olingo.odata2.api.commons.HttpStatusCodes} callback handler
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
+     * @param responseHandler
+     *        {@link org.apache.olingo.odata2.api.commons.HttpStatusCodes}
+     *            callback handler
      */
-    void delete(String resourcePath, Map<String, String> endpointHttpHeaders, 
-                Olingo2ResponseHandler<HttpStatusCodes> responseHandler);
+    void delete(String resourcePath, Map<String, String> endpointHttpHeaders, Olingo2ResponseHandler<HttpStatusCodes> responseHandler);
 
     /**
      * Creates a new OData resource.
+     * 
      * @param edm service Edm
      * @param resourcePath resource path to create
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
      * @param data request data
      * @param responseHandler callback handler
      */
-    <T> void create(Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, 
-                    Olingo2ResponseHandler<T> responseHandler);
+    <T> void create(Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo2ResponseHandler<T> responseHandler);
 
     /**
      * Updates an OData resource.
+     * 
      * @param edm service Edm
      * @param resourcePath resource path to update
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
      * @param data updated data
-     * @param responseHandler {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry} callback handler
+     * @param responseHandler
+     *        {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry} callback
+     *            handler
      */
-    <T> void update(Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, 
-                    Olingo2ResponseHandler<T> responseHandler);
+    <T> void update(Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo2ResponseHandler<T> responseHandler);
 
     /**
      * Patches/merges an OData resource using HTTP PATCH.
+     * 
      * @param edm service Edm
      * @param resourcePath resource path to update
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
      * @param data patch/merge data
-     * @param responseHandler {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry} callback handler
+     * @param responseHandler
+     *        {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry} callback
+     *            handler
      */
-    <T> void patch(Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, 
-                   Olingo2ResponseHandler<T> responseHandler);
+    <T> void patch(Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo2ResponseHandler<T> responseHandler);
 
     /**
      * Patches/merges an OData resource using HTTP MERGE.
+     * 
      * @param edm service Edm
      * @param resourcePath resource path to update
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
      * @param data patch/merge data
-     * @param responseHandler {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry} callback handler
+     * @param responseHandler
+     *        {@link org.apache.olingo.odata2.api.ep.entry.ODataEntry} callback
+     *            handler
      */
-    <T> void merge(Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, 
-                   Olingo2ResponseHandler<T> responseHandler);
+    <T> void merge(Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo2ResponseHandler<T> responseHandler);
 
     /**
      * Executes a batch request.
+     * 
      * @param edm service Edm
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
-     * @param data ordered {@link org.apache.camel.component.olingo2.api.batch.Olingo2BatchRequest} list
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
+     * @param data ordered
+     *            {@link org.apache.camel.component.olingo2.api.batch.Olingo2BatchRequest}
+     *            list
      * @param responseHandler callback handler
      */
-    void batch(Edm edm, Map<String, String> endpointHttpHeaders, Object data, 
-               Olingo2ResponseHandler<List<Olingo2BatchResponse>> responseHandler);
+    void batch(Edm edm, Map<String, String> endpointHttpHeaders, Object data, Olingo2ResponseHandler<List<Olingo2BatchResponse>> responseHandler);
 }
diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/Olingo2ResponseHandler.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/Olingo2ResponseHandler.java
index 90c241a..5638dd5 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/Olingo2ResponseHandler.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/Olingo2ResponseHandler.java
@@ -25,22 +25,26 @@ public interface Olingo2ResponseHandler<T> {
 
     /**
      * Handle response data on successful completion of Olingo2 request.
-     * @param response response data from Olingo2, may be NULL for Olingo2 operations with no response data.
-     * @param responseHeaders the response HTTP headers received from the endpoint.
+     * 
+     * @param response response data from Olingo2, may be NULL for Olingo2
+     *            operations with no response data.
+     * @param responseHeaders the response HTTP headers received from the
+     *            endpoint.
      */
     void onResponse(T response, Map<String, String> responseHeaders);
 
     /**
      * Handle exception raised from Olingo2 request.
-     * @param ex exception from Olingo2 request.
-     *           May be an instance of {@link org.apache.olingo.odata2.api.exception.ODataException} or
-     *           some other exception, such as {@link java.io.IOException}
+     * 
+     * @param ex exception from Olingo2 request. May be an instance of
+     *            {@link org.apache.olingo.odata2.api.exception.ODataException}
+     *            or some other exception, such as {@link java.io.IOException}
      */
     void onException(Exception ex);
 
     /**
-     * Handle Olingo2 request cancellation.
-     * May be caused by the underlying HTTP connection being shutdown asynchronously.
+     * Handle Olingo2 request cancellation. May be caused by the underlying HTTP
+     * connection being shutdown asynchronously.
      */
     void onCanceled();
 }
diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Olingo2BatchChangeRequest.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Olingo2BatchChangeRequest.java
index a1ba3bb..78a8db1 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Olingo2BatchChangeRequest.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Olingo2BatchChangeRequest.java
@@ -41,14 +41,8 @@ public class Olingo2BatchChangeRequest extends Olingo2BatchRequest {
 
     @Override
     public String toString() {
-        return new StringBuilder("Batch Change Request{ ")
-            .append(resourcePath)
-            .append(", headers=").append(headers)
-            .append(", contentId=").append(contentId)
-            .append(", operation=").append(operation)
-            .append(", body=").append(body)
-            .append('}')
-            .toString();
+        return new StringBuilder("Batch Change Request{ ").append(resourcePath).append(", headers=").append(headers).append(", contentId=").append(contentId).append(", operation=")
+            .append(operation).append(", body=").append(body).append('}').toString();
     }
 
     public static Olingo2BatchChangeRequestBuilder resourcePath(String resourcePath) {
diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Olingo2BatchQueryRequest.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Olingo2BatchQueryRequest.java
index 06b1e44..334b872 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Olingo2BatchQueryRequest.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Olingo2BatchQueryRequest.java
@@ -38,11 +38,7 @@ public class Olingo2BatchQueryRequest extends Olingo2BatchRequest {
 
     @Override
     public String toString() {
-        return new StringBuilder("Batch Query Request{ ")
-            .append(resourcePath)
-            .append(", headers=").append(headers)
-            .append(", queryParams=").append(queryParams)
-            .append('}')
+        return new StringBuilder("Batch Query Request{ ").append(resourcePath).append(", headers=").append(headers).append(", queryParams=").append(queryParams).append('}')
             .toString();
     }
 
diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Olingo2BatchResponse.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Olingo2BatchResponse.java
index d7377dd..a0d6cbc 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Olingo2BatchResponse.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Olingo2BatchResponse.java
@@ -33,9 +33,7 @@ public class Olingo2BatchResponse {
     private final Map<String, String> headers;
     private final Object body;
 
-
-    public Olingo2BatchResponse(int statusCode, String statusInfo,
-                               String contentId, Map<String, String> headers, Object body) {
+    public Olingo2BatchResponse(int statusCode, String statusInfo, String contentId, Map<String, String> headers, Object body) {
         this.statusCode = statusCode;
         this.statusInfo = statusInfo;
         this.contentId = contentId;
diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Operation.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Operation.java
index a74ed04..8d8131a 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Operation.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/batch/Operation.java
@@ -17,8 +17,9 @@
 package org.apache.camel.component.olingo2.api.batch;
 
 /**
-* OData operation used by {@link org.apache.camel.component.olingo2.api.batch.Olingo2BatchChangeRequest}.
-*/
+ * OData operation used by
+ * {@link org.apache.camel.component.olingo2.api.batch.Olingo2BatchChangeRequest}.
+ */
 public enum Operation {
 
     CREATE("POST"), UPDATE("PUT"), PATCH("PATCH"), MERGE("MERGE"), DELETE("DELETE");
diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/AbstractFutureCallback.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/AbstractFutureCallback.java
index 69d821e..9bf7b24 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/AbstractFutureCallback.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/AbstractFutureCallback.java
@@ -35,9 +35,9 @@ import org.apache.olingo.odata2.api.processor.ODataErrorContext;
 import static org.apache.camel.component.olingo2.api.impl.Olingo2Helper.getContentTypeHeader;
 
 /**
-* Helper implementation of {@link org.apache.http.concurrent.FutureCallback}
+ * Helper implementation of {@link org.apache.http.concurrent.FutureCallback}
  * for {@link org.apache.camel.component.olingo2.api.impl.Olingo2AppImpl}
-*/
+ */
 public abstract class AbstractFutureCallback<T> implements FutureCallback<HttpResponse> {
 
     public static final Pattern ODATA_MIME_TYPE = Pattern.compile("application/((atom)|(json)|(xml)).*");
@@ -56,12 +56,9 @@ public abstract class AbstractFutureCallback<T> implements FutureCallback<HttpRe
                     final ContentType responseContentType = getContentTypeHeader(response);
 
                     if (responseContentType != null && ODATA_MIME_TYPE.matcher(responseContentType.getMimeType()).matches()) {
-                        final ODataErrorContext errorContext = EntityProvider.readErrorDocument(
-                            response.getEntity().getContent(),
-                            responseContentType.toString());
-                        throw new ODataApplicationException(errorContext.getMessage(),
-                            errorContext.getLocale(), httpStatusCode, errorContext.getErrorCode(),
-                            errorContext.getException());
+                        final ODataErrorContext errorContext = EntityProvider.readErrorDocument(response.getEntity().getContent(), responseContentType.toString());
+                        throw new ODataApplicationException(errorContext.getMessage(), errorContext.getLocale(), httpStatusCode, errorContext.getErrorCode(),
+                                                            errorContext.getException());
                     }
                 } catch (EntityProviderException e) {
                     throw new ODataApplicationException(e.getMessage(), response.getLocale(), httpStatusCode, e);
@@ -88,7 +85,7 @@ public abstract class AbstractFutureCallback<T> implements FutureCallback<HttpRe
         } finally {
             if (result instanceof Closeable) {
                 try {
-                    ((Closeable) result).close();
+                    ((Closeable)result).close();
                 } catch (final IOException ignore) {
                 }
             }
diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/ODataPathSegmentImpl.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/ODataPathSegmentImpl.java
index 78e29a2..35c1350 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/ODataPathSegmentImpl.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/ODataPathSegmentImpl.java
@@ -24,7 +24,8 @@ import java.util.Map;
 import org.apache.olingo.odata2.api.uri.PathSegment;
 
 /**
- * Copied from Olingo2 library, since URI parsing wasn't made a part of it's public API.
+ * Copied from Olingo2 library, since URI parsing wasn't made a part of it's
+ * public API.
  */
 public class ODataPathSegmentImpl implements PathSegment {
 
diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java
index e5fae97..ed532e6f 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java
@@ -110,12 +110,9 @@ public final class Olingo2AppImpl implements Olingo2App {
     private static final String BOUNDARY_PREFIX = "batch_";
     private static final String BOUNDARY_PARAMETER = "; boundary=";
 
-    private static final ContentType METADATA_CONTENT_TYPE =
-        ContentType.create("application/xml", Consts.UTF_8);
-    private static final ContentType SERVICE_DOCUMENT_CONTENT_TYPE =
-        ContentType.create("application/atomsvc+xml", Consts.UTF_8);
-    private static final String BATCH_CONTENT_TYPE =
-        ContentType.create("multipart/mixed").toString();
+    private static final ContentType METADATA_CONTENT_TYPE = ContentType.create("application/xml", Consts.UTF_8);
+    private static final ContentType SERVICE_DOCUMENT_CONTENT_TYPE = ContentType.create("application/atomsvc+xml", Consts.UTF_8);
+    private static final String BATCH_CONTENT_TYPE = ContentType.create("multipart/mixed").toString();
 
     private static final String BATCH = "$batch";
     private static final String MAX_DATA_SERVICE_VERSION = "Max" + ODataHttpHeaders.DATASERVICEVERSION;
@@ -136,7 +133,7 @@ public final class Olingo2AppImpl implements Olingo2App {
      */
     public Olingo2AppImpl(String serviceUri) {
         // By default create HTTP Asynchronous client
-        this(serviceUri, (HttpAsyncClientBuilder) null);
+        this(serviceUri, (HttpAsyncClientBuilder)null);
     }
 
     /**
@@ -180,8 +177,7 @@ public final class Olingo2AppImpl implements Olingo2App {
         if (serviceUri == null || serviceUri.isEmpty()) {
             throw new IllegalArgumentException("serviceUri is not set");
         }
-        this.serviceUri = serviceUri.endsWith(SEPARATOR) ? serviceUri.substring(0, serviceUri.length() - 1)
-            : serviceUri;
+        this.serviceUri = serviceUri.endsWith(SEPARATOR) ? serviceUri.substring(0, serviceUri.length() - 1) : serviceUri;
     }
 
     @Override
@@ -220,44 +216,37 @@ public final class Olingo2AppImpl implements Olingo2App {
     }
 
     @Override
-    public <T> void read(final Edm edm, final String resourcePath, final Map<String, String> queryParams,
-                         final Map<String, String> endpointHttpHeaders, 
+    public <T> void read(final Edm edm, final String resourcePath, final Map<String, String> queryParams, final Map<String, String> endpointHttpHeaders,
                          final Olingo2ResponseHandler<T> responseHandler) {
 
         final UriInfoWithType uriInfo = parseUri(edm, resourcePath, queryParams);
 
-        execute(new HttpGet(createUri(resourcePath, encodeQueryParams(queryParams))), getResourceContentType(uriInfo),
-            endpointHttpHeaders, new AbstractFutureCallback<T>(responseHandler) {
+        execute(new HttpGet(createUri(resourcePath, encodeQueryParams(queryParams))), getResourceContentType(uriInfo), endpointHttpHeaders,
+                new AbstractFutureCallback<T>(responseHandler) {
 
-                @Override
-                public void onCompleted(HttpResponse result) throws IOException {
-                    readContent(uriInfo, 
-                        headersToMap(result.getAllHeaders()),
-                        result.getEntity() != null ? result.getEntity().getContent() : null,
-                        responseHandler);
-                }
+                    @Override
+                    public void onCompleted(HttpResponse result) throws IOException {
+                        readContent(uriInfo, headersToMap(result.getAllHeaders()), result.getEntity() != null ? result.getEntity().getContent() : null, responseHandler);
+                    }
 
-            });
+                });
     }
 
     @Override
-    public void uread(final Edm edm, final String resourcePath, final Map<String, String> queryParams,
-                      final Map<String, String> endpointHttpHeaders, 
+    public void uread(final Edm edm, final String resourcePath, final Map<String, String> queryParams, final Map<String, String> endpointHttpHeaders,
                       final Olingo2ResponseHandler<InputStream> responseHandler) {
 
         final UriInfoWithType uriInfo = parseUri(edm, resourcePath, queryParams);
 
-        execute(new HttpGet(createUri(resourcePath, encodeQueryParams(queryParams))), getResourceContentType(uriInfo),
-            endpointHttpHeaders, new AbstractFutureCallback<InputStream>(responseHandler) {
+        execute(new HttpGet(createUri(resourcePath, encodeQueryParams(queryParams))), getResourceContentType(uriInfo), endpointHttpHeaders,
+                new AbstractFutureCallback<InputStream>(responseHandler) {
 
-                @Override
-                public void onCompleted(HttpResponse result) throws IOException {
-                    responseHandler.onResponse(
-                        (result.getEntity() != null) ? result.getEntity().getContent() : null,
-                        headersToMap(result.getAllHeaders()));
-                }
+                    @Override
+                    public void onCompleted(HttpResponse result) throws IOException {
+                        responseHandler.onResponse((result.getEntity() != null) ? result.getEntity().getContent() : null, headersToMap(result.getAllHeaders()));
+                    }
 
-            });
+                });
     }
 
     private Map<String, String> encodeQueryParams(Map<String, String> queryParams) {
@@ -306,10 +295,7 @@ public final class Olingo2AppImpl implements Olingo2App {
     }
 
     @Override
-    public <T> void create(final Edm edm, 
-                           final String resourcePath, 
-                           final Map<String, String> endpointHttpHeaders, 
-                           final Object data, 
+    public <T> void create(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data,
                            final Olingo2ResponseHandler<T> responseHandler) {
         final UriInfoWithType uriInfo = parseUri(edm, resourcePath, null);
 
@@ -317,104 +303,82 @@ public final class Olingo2AppImpl implements Olingo2App {
     }
 
     @Override
-    public <T> void update(final Edm edm, 
-                           final String resourcePath, 
-                           final Map<String, String> endpointHttpHeaders, 
-                           final Object data, 
+    public <T> void update(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data,
                            final Olingo2ResponseHandler<T> responseHandler) {
         final UriInfoWithType uriInfo = parseUri(edm, resourcePath, null);
 
-        augmentWithETag(edm, resourcePath, endpointHttpHeaders,
-                        new HttpPut(createUri(resourcePath, null)),
-                        request -> writeContent(edm, (HttpPut) request, uriInfo, endpointHttpHeaders, data, responseHandler),
-                        responseHandler);
+        augmentWithETag(edm, resourcePath, endpointHttpHeaders, new HttpPut(createUri(resourcePath, null)),
+        request -> writeContent(edm, (HttpPut)request, uriInfo, endpointHttpHeaders, data, responseHandler), responseHandler);
     }
 
     @Override
-    public <T> void patch(final Edm edm, 
-                          final String resourcePath, 
-                          final Map<String, String> endpointHttpHeaders, 
-                          final Object data, 
+    public <T> void patch(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data,
                           final Olingo2ResponseHandler<T> responseHandler) {
         final UriInfoWithType uriInfo = parseUri(edm, resourcePath, null);
 
-        augmentWithETag(edm, resourcePath, endpointHttpHeaders,
-                        new HttpPatch(createUri(resourcePath, null)),
-                        request -> writeContent(edm, (HttpPatch) request, uriInfo, endpointHttpHeaders, data, responseHandler),
-                        responseHandler);
+        augmentWithETag(edm, resourcePath, endpointHttpHeaders, new HttpPatch(createUri(resourcePath, null)),
+        request -> writeContent(edm, (HttpPatch)request, uriInfo, endpointHttpHeaders, data, responseHandler), responseHandler);
     }
 
     @Override
-    public <T> void merge(final Edm edm, 
-                          final String resourcePath, 
-                          final Map<String, String> endpointHttpHeaders, 
-                          final Object data, 
+    public <T> void merge(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data,
                           final Olingo2ResponseHandler<T> responseHandler) {
         final UriInfoWithType uriInfo = parseUri(edm, resourcePath, null);
 
-        augmentWithETag(edm, resourcePath, endpointHttpHeaders,
-                        new HttpMerge(createUri(resourcePath, null)),
-                        request -> writeContent(edm, (HttpMerge) request, uriInfo, endpointHttpHeaders, data, responseHandler),
-                        responseHandler);
+        augmentWithETag(edm, resourcePath, endpointHttpHeaders, new HttpMerge(createUri(resourcePath, null)),
+        request -> writeContent(edm, (HttpMerge)request, uriInfo, endpointHttpHeaders, data, responseHandler), responseHandler);
     }
 
     @Override
-    public void batch(final Edm edm, 
-                      final Map<String, String> endpointHttpHeaders, 
-                      final Object data, 
-                      final Olingo2ResponseHandler<List<Olingo2BatchResponse>> responseHandler) {
+    public void batch(final Edm edm, final Map<String, String> endpointHttpHeaders, final Object data, final Olingo2ResponseHandler<List<Olingo2BatchResponse>> responseHandler) {
         final UriInfoWithType uriInfo = parseUri(edm, BATCH, null);
 
         writeContent(edm, new HttpPost(createUri(BATCH, null)), uriInfo, endpointHttpHeaders, data, responseHandler);
     }
 
     @Override
-    public void delete(final String resourcePath, 
-                       final Map<String, String> endpointHttpHeaders, 
-                       final Olingo2ResponseHandler<HttpStatusCodes> responseHandler) {
+    public void delete(final String resourcePath, final Map<String, String> endpointHttpHeaders, final Olingo2ResponseHandler<HttpStatusCodes> responseHandler) {
         HttpDelete deleteRequest = new HttpDelete(createUri(resourcePath));
 
         Consumer<HttpRequestBase> deleteFunction = (request) -> {
-            execute(request, contentType,
-                    endpointHttpHeaders, new AbstractFutureCallback<HttpStatusCodes>(responseHandler) {
+            execute(request, contentType, endpointHttpHeaders, new AbstractFutureCallback<HttpStatusCodes>(responseHandler) {
                 @Override
                 public void onCompleted(HttpResponse result) {
                     final StatusLine statusLine = result.getStatusLine();
-                    responseHandler.onResponse(HttpStatusCodes.fromStatusCode(statusLine.getStatusCode()),
-                        headersToMap(result.getAllHeaders()));
+                    responseHandler.onResponse(HttpStatusCodes.fromStatusCode(statusLine.getStatusCode()), headersToMap(result.getAllHeaders()));
                 }
             });
         };
 
-        augmentWithETag(null, resourcePath, endpointHttpHeaders,
-                        deleteRequest,
-                        deleteFunction,
-                        responseHandler);
+        augmentWithETag(null, resourcePath, endpointHttpHeaders, deleteRequest, deleteFunction, responseHandler);
     }
 
     /**
-     * On occasion, some resources are protected with Optimistic Concurrency via the use of eTags.
-     * This will first conduct a read on the given entity resource, find its eTag then perform the given
-     * delegate request function, augmenting the request with the eTag, if appropriate.
-     *
-     * Since read operations may be asynchronous, it is necessary to chain together the methods via
-     * the use of a {@link Consumer} function. Only when the response from the read returns will
-     * this delegate function be executed.
+     * On occasion, some resources are protected with Optimistic Concurrency via
+     * the use of eTags. This will first conduct a read on the given entity
+     * resource, find its eTag then perform the given delegate request function,
+     * augmenting the request with the eTag, if appropriate. Since read
+     * operations may be asynchronous, it is necessary to chain together the
+     * methods via the use of a {@link Consumer} function. Only when the
+     * response from the read returns will this delegate function be executed.
      *
      * @param edm the Edm object to be interrogated
      * @param resourcePath the resource path of the entity to be operated on
-     * @param endpointHttpHeaders the headers provided from the endpoint which may be required for the read operation
-     * @param httpRequest the request to be updated, if appropriate, with the eTag and provided to the delegate request function
-     * @param delegateRequestFn the function to be invoked in response to the read operation
-     * @param delegateResponseHandler the response handler to respond if any errors occur during the read operation
+     * @param endpointHttpHeaders the headers provided from the endpoint which
+     *            may be required for the read operation
+     * @param httpRequest the request to be updated, if appropriate, with the
+     *            eTag and provided to the delegate request function
+     * @param delegateRequestFn the function to be invoked in response to the
+     *            read operation
+     * @param delegateResponseHandler the response handler to respond if any
+     *            errors occur during the read operation
      */
-    private <T> void augmentWithETag(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders,
-                                     final HttpRequestBase httpRequest,
-                                     final Consumer<HttpRequestBase> delegateRequestFn,
-                                     final Olingo2ResponseHandler<T> delegateResponseHandler) {
+    private <T> void augmentWithETag(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final HttpRequestBase httpRequest,
+                                     final Consumer<HttpRequestBase> delegateRequestFn, final Olingo2ResponseHandler<T> delegateResponseHandler) {
 
         if (edm == null) {
-            // Can be the case if calling a delete then need to do a metadata call first
+            // Can be the case if calling a delete then need to do a metadata
+            // call first
             final Olingo2ResponseHandler<Edm> edmResponseHandler = new Olingo2ResponseHandler<Edm>() {
                 @Override
                 public void onResponse(Edm response, Map<String, String> responseHeaders) {
@@ -437,14 +401,16 @@ public final class Olingo2AppImpl implements Olingo2App {
 
             //
             // Reads the metadata to establish an Edm object
-            // then the response handler invokes this method again with the new edm object
+            // then the response handler invokes this method again with the new
+            // edm object
             //
             read(null, "$metadata", null, null, edmResponseHandler);
 
         } else {
 
             //
-            // The handler that responds to the read operation and supplies an ETag if necessary
+            // The handler that responds to the read operation and supplies an
+            // ETag if necessary
             // and invokes the delegate request function
             //
             Olingo2ResponseHandler<T> eTagReadHandler = new Olingo2ResponseHandler<T>() {
@@ -452,14 +418,12 @@ public final class Olingo2AppImpl implements Olingo2App {
                 @Override
                 public void onResponse(T response, Map<String, String> responseHeaders) {
                     if (response instanceof ODataEntry) {
-                        ODataEntry e = (ODataEntry) response;
-                        Optional
-                           .ofNullable(e.getMetadata())
-                           .map(EntryMetadata::getEtag)
-                           .ifPresent(v -> httpRequest.addHeader("If-Match", v));
+                        ODataEntry e = (ODataEntry)response;
+                        Optional.ofNullable(e.getMetadata()).map(EntryMetadata::getEtag).ifPresent(v -> httpRequest.addHeader("If-Match", v));
                     }
 
-                    // Invoke the delegate request function providing the modified request
+                    // Invoke the delegate request function providing the
+                    // modified request
                     delegateRequestFn.accept(httpRequest);
                 }
 
@@ -480,7 +444,7 @@ public final class Olingo2AppImpl implements Olingo2App {
 
     private <T> void readContent(UriInfoWithType uriInfo, Map<String, String> responseHeaders, InputStream content, Olingo2ResponseHandler<T> responseHandler) {
         try {
-            responseHandler.onResponse(this.<T>readContent(uriInfo, content), responseHeaders);
+            responseHandler.onResponse(this.<T> readContent(uriInfo, content), responseHeaders);
         } catch (Exception e) {
             responseHandler.onException(e);
         } catch (Error e) {
@@ -489,36 +453,34 @@ public final class Olingo2AppImpl implements Olingo2App {
     }
 
     @SuppressWarnings("unchecked")
-    private <T> T readContent(UriInfoWithType uriInfo, InputStream content)
-        throws EntityProviderException, ODataApplicationException {
+    private <T> T readContent(UriInfoWithType uriInfo, InputStream content) throws EntityProviderException, ODataApplicationException {
         T response;
         switch (uriInfo.getUriType()) {
         case URI0:
             // service document
-            response = (T) EntityProvider.readServiceDocument(content, SERVICE_DOCUMENT_CONTENT_TYPE.toString());
+            response = (T)EntityProvider.readServiceDocument(content, SERVICE_DOCUMENT_CONTENT_TYPE.toString());
             break;
 
         case URI8:
             // $metadata
-            response = (T) EntityProvider.readMetadata(content, false);
+            response = (T)EntityProvider.readMetadata(content, false);
             break;
 
         case URI7A:
             // link
-            response = (T) EntityProvider.readLink(getContentType(), uriInfo.getTargetEntitySet(), content);
+            response = (T)EntityProvider.readLink(getContentType(), uriInfo.getTargetEntitySet(), content);
             break;
 
         case URI7B:
             // links
-            response = (T) EntityProvider.readLinks(getContentType(), uriInfo.getTargetEntitySet(), content);
+            response = (T)EntityProvider.readLinks(getContentType(), uriInfo.getTargetEntitySet(), content);
             break;
 
         case URI3:
             // complex property
             final List<EdmProperty> complexPropertyPath = uriInfo.getPropertyPath();
             final EdmProperty complexProperty = complexPropertyPath.get(complexPropertyPath.size() - 1);
-            response = (T) EntityProvider.readProperty(getContentType(),
-                complexProperty, content, EntityProviderReadProperties.init().build());
+            response = (T)EntityProvider.readProperty(getContentType(), complexProperty, content, EntityProviderReadProperties.init().build());
             break;
 
         case URI4:
@@ -527,10 +489,9 @@ public final class Olingo2AppImpl implements Olingo2App {
             final List<EdmProperty> simplePropertyPath = uriInfo.getPropertyPath();
             final EdmProperty simpleProperty = simplePropertyPath.get(simplePropertyPath.size() - 1);
             if (uriInfo.isValue()) {
-                response = (T) EntityProvider.readPropertyValue(simpleProperty, content);
+                response = (T)EntityProvider.readPropertyValue(simpleProperty, content);
             } else {
-                response = (T) EntityProvider.readProperty(getContentType(),
-                    simpleProperty, content, EntityProviderReadProperties.init().build());
+                response = (T)EntityProvider.readProperty(getContentType(), simpleProperty, content, EntityProviderReadProperties.init().build());
             }
             break;
 
@@ -540,33 +501,23 @@ public final class Olingo2AppImpl implements Olingo2App {
         case URI50B:
             // $count
             final String stringCount = new String(EntityProvider.readBinary(content), Consts.UTF_8);
-            response = (T) Long.valueOf(stringCount);
+            response = (T)Long.valueOf(stringCount);
             break;
 
         case URI1:
         case URI6B:
             if (uriInfo.getCustomQueryOptions().containsKey("!deltatoken")) {
                 // ODataDeltaFeed
-                response = (T) EntityProvider.readDeltaFeed(
-                    getContentType(),
-                    uriInfo.getTargetEntitySet(), content,
-                    EntityProviderReadProperties.init().build());
+                response = (T)EntityProvider.readDeltaFeed(getContentType(), uriInfo.getTargetEntitySet(), content, EntityProviderReadProperties.init().build());
             } else {
                 // ODataFeed
-                response = (T) EntityProvider.readFeed(
-                    getContentType(),
-                    uriInfo.getTargetEntitySet(), content,
-                    EntityProviderReadProperties.init().build());
+                response = (T)EntityProvider.readFeed(getContentType(), uriInfo.getTargetEntitySet(), content, EntityProviderReadProperties.init().build());
             }
             break;
 
         case URI2:
         case URI6A:
-            response = (T) EntityProvider.readEntry(
-                getContentType(),
-                uriInfo.getTargetEntitySet(),
-                content,
-                EntityProviderReadProperties.init().build());
+            response = (T)EntityProvider.readEntry(getContentType(), uriInfo.getTargetEntitySet(), content, EntityProviderReadProperties.init().build());
             break;
 
         // Function Imports
@@ -575,24 +526,18 @@ public final class Olingo2AppImpl implements Olingo2App {
         case URI12:
         case URI13:
         case URI14:
-            response = (T) EntityProvider.readFunctionImport(getContentType(),
-                uriInfo.getFunctionImport(), content,
-                EntityProviderReadProperties.init().build());
+            response = (T)EntityProvider.readFunctionImport(getContentType(), uriInfo.getFunctionImport(), content, EntityProviderReadProperties.init().build());
             break;
 
         default:
-            throw new ODataApplicationException("Unsupported resource type " + uriInfo.getTargetType(),
-                Locale.ENGLISH);
+            throw new ODataApplicationException("Unsupported resource type " + uriInfo.getTargetType(), Locale.ENGLISH);
         }
 
         return response;
     }
 
-    private <T> void writeContent(final Edm edm, final HttpEntityEnclosingRequestBase httpEntityRequest,
-                                  final UriInfoWithType uriInfo, 
-                                  final Map<String, String> endpointHttpHeaders,
-                                  final Object content,
-                                  final Olingo2ResponseHandler<T> responseHandler) {
+    private <T> void writeContent(final Edm edm, final HttpEntityEnclosingRequestBase httpEntityRequest, final UriInfoWithType uriInfo,
+                                  final Map<String, String> endpointHttpHeaders, final Object content, final Olingo2ResponseHandler<T> responseHandler) {
 
         try {
             // process resource by UriType
@@ -603,94 +548,83 @@ public final class Olingo2AppImpl implements Olingo2App {
                 httpEntityRequest.setHeader(header, response.getHeader(header));
             }
 
-            // get (http) entity which is for default Olingo2 implementation an InputStream
+            // get (http) entity which is for default Olingo2 implementation an
+            // InputStream
             if (response.getEntity() instanceof InputStream) {
-                httpEntityRequest.setEntity(new InputStreamEntity((InputStream) response.getEntity()));
-/*
-                // avoid sending it without a header field set
-                if (!httpEntityRequest.containsHeader(HttpHeaders.CONTENT_TYPE)) {
-                    httpEntityRequest.addHeader(HttpHeaders.CONTENT_TYPE, getContentType());
-                }
-*/
+                httpEntityRequest.setEntity(new InputStreamEntity((InputStream)response.getEntity()));
+                /*
+                 * // avoid sending it without a header field set if
+                 * (!httpEntityRequest.containsHeader(HttpHeaders.CONTENT_TYPE))
+                 * { httpEntityRequest.addHeader(HttpHeaders.CONTENT_TYPE,
+                 * getContentType()); }
+                 */
             }
 
             // execute HTTP request
             final Header requestContentTypeHeader = httpEntityRequest.getFirstHeader(HttpHeaders.CONTENT_TYPE);
-            final ContentType requestContentType = requestContentTypeHeader != null
-                ? ContentType.parse(requestContentTypeHeader.getValue()) : contentType;
+            final ContentType requestContentType = requestContentTypeHeader != null ? ContentType.parse(requestContentTypeHeader.getValue()) : contentType;
             execute(httpEntityRequest, requestContentType, endpointHttpHeaders, new AbstractFutureCallback<T>(responseHandler) {
                 @SuppressWarnings("unchecked")
                 @Override
-                public void onCompleted(HttpResponse result)
-                    throws IOException, EntityProviderException, BatchException, ODataApplicationException {
+                public void onCompleted(HttpResponse result) throws IOException, EntityProviderException, BatchException, ODataApplicationException {
 
-                    // if a entity is created (via POST request) the response body contains the new created entity
+                    // if a entity is created (via POST request) the response
+                    // body contains the new created entity
                     HttpStatusCodes statusCode = HttpStatusCodes.fromStatusCode(result.getStatusLine().getStatusCode());
 
                     // look for no content, or no response body!!!
                     final boolean noEntity = result.getEntity() == null || result.getEntity().getContentLength() == 0;
                     if (statusCode == HttpStatusCodes.NO_CONTENT || noEntity) {
-                        responseHandler.onResponse(
-                            (T) HttpStatusCodes.fromStatusCode(result.getStatusLine().getStatusCode()),
-                            headersToMap(result.getAllHeaders()));
+                        responseHandler.onResponse((T)HttpStatusCodes.fromStatusCode(result.getStatusLine().getStatusCode()), headersToMap(result.getAllHeaders()));
                     } else {
 
                         switch (uriInfo.getUriType()) {
                         case URI9:
                             // $batch
                             String type = result.containsHeader(HttpHeaders.CONTENT_TYPE) ? result.getFirstHeader(HttpHeaders.CONTENT_TYPE).getValue() : null;
-                            final List<BatchSingleResponse> singleResponses = EntityProvider.parseBatchResponse(
-                                result.getEntity().getContent(), type);
+                            final List<BatchSingleResponse> singleResponses = EntityProvider.parseBatchResponse(result.getEntity().getContent(), type);
 
                             // parse batch response bodies
                             final List<Olingo2BatchResponse> responses = new ArrayList<>();
                             Map<String, String> contentIdLocationMap = new HashMap<>();
 
-                            final List<Olingo2BatchRequest> batchRequests = (List<Olingo2BatchRequest>) content;
+                            final List<Olingo2BatchRequest> batchRequests = (List<Olingo2BatchRequest>)content;
                             final Iterator<Olingo2BatchRequest> iterator = batchRequests.iterator();
 
                             for (BatchSingleResponse response : singleResponses) {
                                 final Olingo2BatchRequest request = iterator.next();
 
-                                if (request instanceof Olingo2BatchChangeRequest
-                                    && ((Olingo2BatchChangeRequest) request).getContentId() != null) {
+                                if (request instanceof Olingo2BatchChangeRequest && ((Olingo2BatchChangeRequest)request).getContentId() != null) {
 
-                                    contentIdLocationMap.put("$" + ((Olingo2BatchChangeRequest) request).getContentId(),
-                                        response.getHeader(HttpHeaders.LOCATION));
+                                    contentIdLocationMap.put("$" + ((Olingo2BatchChangeRequest)request).getContentId(), response.getHeader(HttpHeaders.LOCATION));
                                 }
 
                                 try {
                                     responses.add(parseResponse(edm, contentIdLocationMap, request, response));
                                 } catch (Exception e) {
-                                    // report any parsing errors as error response
-                                    responses.add(new Olingo2BatchResponse(
-                                        Integer.parseInt(response.getStatusCode()),
-                                        response.getStatusInfo(), response.getContentId(), response.getHeaders(),
-                                        new ODataApplicationException(
-                                            "Error parsing response for " + request + ": " + e.getMessage(),
-                                            Locale.ENGLISH, e)));
+                                    // report any parsing errors as error
+                                    // response
+                                    responses.add(new Olingo2BatchResponse(Integer.parseInt(response.getStatusCode()), response.getStatusInfo(), response.getContentId(), response
+                                        .getHeaders(), new ODataApplicationException("Error parsing response for " + request + ": " + e.getMessage(), Locale.ENGLISH, e)));
                                 }
                             }
-                            responseHandler.onResponse((T) responses, headersToMap(result.getAllHeaders()));
+                            responseHandler.onResponse((T)responses, headersToMap(result.getAllHeaders()));
                             break;
 
                         case URI4:
                         case URI5:
                             // simple property
-                            // get the response content as Object for $value or Map<String, Object> otherwise
+                            // get the response content as Object for $value or
+                            // Map<String, Object> otherwise
                             final List<EdmProperty> simplePropertyPath = uriInfo.getPropertyPath();
                             final EdmProperty simpleProperty = simplePropertyPath.get(simplePropertyPath.size() - 1);
                             if (uriInfo.isValue()) {
-                                responseHandler.onResponse(
-                                    (T) EntityProvider.readPropertyValue(simpleProperty,
-                                        result.getEntity().getContent()),
-                                    headersToMap(result.getAllHeaders()));
+                                responseHandler.onResponse((T)EntityProvider.readPropertyValue(simpleProperty, result.getEntity().getContent()),
+                                                           headersToMap(result.getAllHeaders()));
                             } else {
-                                responseHandler.onResponse(
-                                    (T) EntityProvider.readProperty(getContentType(), simpleProperty,
-                                        result.getEntity().getContent(),
-                                        EntityProviderReadProperties.init().build()),
-                                    headersToMap(result.getAllHeaders()));
+                                responseHandler.onResponse((T)EntityProvider.readProperty(getContentType(), simpleProperty, result.getEntity().getContent(),
+                                                                                          EntityProviderReadProperties.init().build()),
+                                                           headersToMap(result.getAllHeaders()));
                             }
                             break;
 
@@ -699,35 +633,26 @@ public final class Olingo2AppImpl implements Olingo2App {
                             // get the response content as Map<String, Object>
                             final List<EdmProperty> complexPropertyPath = uriInfo.getPropertyPath();
                             final EdmProperty complexProperty = complexPropertyPath.get(complexPropertyPath.size() - 1);
-                            responseHandler.onResponse((T) EntityProvider.readProperty(getContentType(),
-                                complexProperty, result
-                                    .getEntity()
-                                    .getContent(),
-                                EntityProviderReadProperties
-                                    .init().build()),
-                                headersToMap(result.getAllHeaders()));
+                            responseHandler.onResponse((T)EntityProvider.readProperty(getContentType(), complexProperty, result.getEntity().getContent(),
+                                                                                      EntityProviderReadProperties.init().build()),
+                                                       headersToMap(result.getAllHeaders()));
                             break;
 
                         case URI7A:
                             // $links with 0..1 cardinality property
                             // get the response content as String
                             final EdmEntitySet targetLinkEntitySet = uriInfo.getTargetEntitySet();
-                            responseHandler.onResponse((T) EntityProvider.readLink(getContentType(),
-                                targetLinkEntitySet, result
-                                    .getEntity()
-                                    .getContent()),
-                                headersToMap(result.getAllHeaders()));
+                            responseHandler.onResponse((T)EntityProvider.readLink(getContentType(), targetLinkEntitySet, result.getEntity().getContent()),
+                                                       headersToMap(result.getAllHeaders()));
                             break;
 
                         case URI7B:
                             // $links with * cardinality property
-                            // get the response content as java.util.List<String>
+                            // get the response content as
+                            // java.util.List<String>
                             final EdmEntitySet targetLinksEntitySet = uriInfo.getTargetEntitySet();
-                            responseHandler.onResponse((T) EntityProvider.readLinks(getContentType(),
-                                targetLinksEntitySet,
-                                result.getEntity()
-                                    .getContent()),
-                                headersToMap(result.getAllHeaders()));
+                            responseHandler.onResponse((T)EntityProvider.readLinks(getContentType(), targetLinksEntitySet, result.getEntity().getContent()),
+                                                       headersToMap(result.getAllHeaders()));
                             break;
 
                         case URI1:
@@ -736,16 +661,13 @@ public final class Olingo2AppImpl implements Olingo2App {
                         case URI6B:
                             // Entity
                             // get the response content as an ODataEntry object
-                            responseHandler.onResponse((T) EntityProvider.readEntry(response.getContentHeader(),
-                                uriInfo.getTargetEntitySet(),
-                                result.getEntity().getContent(),
-                                EntityProviderReadProperties.init().build()),
-                                headersToMap(result.getAllHeaders()));
+                            responseHandler.onResponse((T)EntityProvider.readEntry(response.getContentHeader(), uriInfo.getTargetEntitySet(), result.getEntity().getContent(),
+                                                                                   EntityProviderReadProperties.init().build()),
+                                                       headersToMap(result.getAllHeaders()));
                             break;
 
                         default:
-                            throw new ODataApplicationException("Unsupported resource type " + uriInfo.getTargetType(),
-                                Locale.ENGLISH);
+                            throw new ODataApplicationException("Unsupported resource type " + uriInfo.getTargetType(), Locale.ENGLISH);
                         }
 
                     }
@@ -789,20 +711,18 @@ public final class Olingo2AppImpl implements Olingo2App {
         case URI7A:
             // $links with 0..1 cardinality property
             final EdmEntitySet targetLinkEntitySet = uriInfo.getTargetEntitySet();
-            EntityProviderWriteProperties linkProperties =
-                EntityProviderWriteProperties.serviceRoot(new URI(serviceUri + SEPARATOR)).build();
+            EntityProviderWriteProperties linkProperties = EntityProviderWriteProperties.serviceRoot(new URI(serviceUri + SEPARATOR)).build();
             @SuppressWarnings("unchecked")
-            final Map<String, Object> linkMap = (Map<String, Object>) content;
+            final Map<String, Object> linkMap = (Map<String, Object>)content;
             response = EntityProvider.writeLink(responseContentType, targetLinkEntitySet, linkMap, linkProperties);
             break;
 
         case URI7B:
             // $links with * cardinality property
             final EdmEntitySet targetLinksEntitySet = uriInfo.getTargetEntitySet();
-            EntityProviderWriteProperties linksProperties =
-                EntityProviderWriteProperties.serviceRoot(new URI(serviceUri + SEPARATOR)).build();
+            EntityProviderWriteProperties linksProperties = EntityProviderWriteProperties.serviceRoot(new URI(serviceUri + SEPARATOR)).build();
             @SuppressWarnings("unchecked")
-            final List<Map<String, Object>> linksMap = (List<Map<String, Object>>) content;
+            final List<Map<String, Object>> linksMap = (List<Map<String, Object>>)content;
             response = EntityProvider.writeLinks(responseContentType, targetLinksEntitySet, linksMap, linksProperties);
             break;
 
@@ -812,28 +732,25 @@ public final class Olingo2AppImpl implements Olingo2App {
         case URI6B:
             // Entity
             final EdmEntitySet targetEntitySet = uriInfo.getTargetEntitySet();
-            EntityProviderWriteProperties properties =
-                EntityProviderWriteProperties.serviceRoot(new URI(serviceUri + SEPARATOR)).build();
+            EntityProviderWriteProperties properties = EntityProviderWriteProperties.serviceRoot(new URI(serviceUri + SEPARATOR)).build();
             @SuppressWarnings("unchecked")
-            final Map<String, Object> objectMap = (Map<String, Object>) content;
+            final Map<String, Object> objectMap = (Map<String, Object>)content;
             response = EntityProvider.writeEntry(responseContentType, targetEntitySet, objectMap, properties);
             break;
 
         case URI9:
             // $batch
             @SuppressWarnings("unchecked")
-            final List<Olingo2BatchRequest> batchParts = (List<Olingo2BatchRequest>) content;
+            final List<Olingo2BatchRequest> batchParts = (List<Olingo2BatchRequest>)content;
             response = parseBatchRequest(edm, batchParts);
             break;
 
         default:
             // notify exception and return!!!
-            throw new ODataApplicationException("Unsupported resource type " + uriInfo.getTargetType(),
-                Locale.ENGLISH);
+            throw new ODataApplicationException("Unsupported resource type " + uriInfo.getTargetType(), Locale.ENGLISH);
         }
 
-        return response.getContentHeader() != null ? response
-            : ODataResponse.fromResponse(response).contentHeader(responseContentType).build();
+        return response.getContentHeader() != null ? response : ODataResponse.fromResponse(response).contentHeader(responseContentType).build();
     }
 
     private ODataResponse parseBatchRequest(final Edm edm, final List<Olingo2BatchRequest> batchParts)
@@ -858,13 +775,12 @@ public final class Olingo2AppImpl implements Olingo2App {
 
                 // add to request parts
                 final UriInfoWithType uriInfo = parseUri(edm, batchPart.getResourcePath(), null);
-                parts.add(createBatchQueryPart(uriInfo, (Olingo2BatchQueryRequest) batchPart));
+                parts.add(createBatchQueryPart(uriInfo, (Olingo2BatchQueryRequest)batchPart));
 
             } else {
 
                 // add to change set parts
-                final BatchChangeSetPart changeSetPart = createBatchChangeSetPart(
-                    edm, contentIdMap, (Olingo2BatchChangeRequest) batchPart);
+                final BatchChangeSetPart changeSetPart = createBatchChangeSetPart(edm, contentIdMap, (Olingo2BatchChangeRequest)batchPart);
                 changeSetParts.add(changeSetPart);
             }
         }
@@ -889,8 +805,7 @@ public final class Olingo2AppImpl implements Olingo2App {
         parts.add(changeSet);
     }
 
-    private BatchChangeSetPart createBatchChangeSetPart(Edm edm, Map<String, String> contentIdMap,
-                                                        Olingo2BatchChangeRequest batchRequest)
+    private BatchChangeSetPart createBatchChangeSetPart(Edm edm, Map<String, String> contentIdMap, Olingo2BatchChangeRequest batchRequest)
         throws EdmException, URISyntaxException, EntityProviderException, IOException, ODataApplicationException {
 
         // build body string
@@ -902,12 +817,12 @@ public final class Olingo2AppImpl implements Olingo2App {
 
         final UriInfoWithType uriInfo = parseUri(edm, resourcePath, null);
 
-        // serialize data into ODataResponse object, if set in request and this is not a DELETE request
+        // serialize data into ODataResponse object, if set in request and this
+        // is not a DELETE request
         final Map<String, String> headers = new HashMap<>();
         byte[] body = null;
 
-        if (batchRequest.getBody() != null
-            && !Operation.DELETE.equals(batchRequest.getOperation())) {
+        if (batchRequest.getBody() != null && !Operation.DELETE.equals(batchRequest.getOperation())) {
 
             final ODataResponse response = writeContent(edm, uriInfo, batchRequest.getBody());
             // copy response headers
@@ -915,9 +830,9 @@ public final class Olingo2AppImpl implements Olingo2App {
                 headers.put(header, response.getHeader(header));
             }
 
-            // get (http) entity which is for default Olingo2 implementation an InputStream
-            body = response.getEntity() instanceof InputStream
-                ? EntityProvider.readBinary((InputStream) response.getEntity()) : null;
+            // get (http) entity which is for default Olingo2 implementation an
+            // InputStream
+            body = response.getEntity() instanceof InputStream ? EntityProvider.readBinary((InputStream)response.getEntity()) : null;
             if (body != null) {
                 headers.put(HttpHeaders.CONTENT_LENGTH, String.valueOf(body.length));
             }
@@ -941,10 +856,7 @@ public final class Olingo2AppImpl implements Olingo2App {
         if (contentId != null) {
             contentIdMap.put("$" + contentId, resourcePath);
         }
-        return BatchChangeSetPart.uri(createBatchUri(batchRequest))
-            .method(batchRequest.getOperation().getHttpMethod())
-            .contentId(contentId)
-            .headers(headers)
+        return BatchChangeSetPart.uri(createBatchUri(batchRequest)).method(batchRequest.getOperation().getHttpMethod()).contentId(contentId).headers(headers)
             .body(body == null ? null : new String(body, Consts.UTF_8)).build();
     }
 
@@ -961,10 +873,7 @@ public final class Olingo2AppImpl implements Olingo2App {
             headers.put(HttpHeaders.ACCEPT_CHARSET, charset.name().toLowerCase());
         }
 
-        return BatchQueryPart.method("GET")
-            .uri(createBatchUri(batchRequest))
-            .headers(headers)
-            .build();
+        return BatchQueryPart.method("GET").uri(createBatchUri(batchRequest)).headers(headers).build();
     }
 
     private static String replaceContentId(Edm edm, String entityReference, Map<String, String> contentIdMap) throws EdmException {
@@ -991,8 +900,7 @@ public final class Olingo2AppImpl implements Olingo2App {
         } else {
             entityContainer = edm.getDefaultEntityContainer();
             if (entityContainer == null) {
-                throw new IllegalArgumentException("EDM does not have a default entity container"
-                    + ", use a fully qualified entity set name");
+                throw new IllegalArgumentException("EDM does not have a default entity container" + ", use a fully qualified entity set name");
             }
         }
         final EdmEntitySet entitySet = entityContainer.getEntitySet(referencedEntityName);
@@ -1009,20 +917,17 @@ public final class Olingo2AppImpl implements Olingo2App {
             referencedEntity.append(')');
         }
 
-        return pathSeparator == -1 ? referencedEntityName
-            : referencedEntity.append(entityReference.substring(pathSeparator)).toString();
+        return pathSeparator == -1 ? referencedEntityName : referencedEntity.append(entityReference.substring(pathSeparator)).toString();
     }
 
-    private Olingo2BatchResponse parseResponse(Edm edm, Map<String, String> contentIdLocationMap,
-                                              Olingo2BatchRequest request, BatchSingleResponse response)
+    private Olingo2BatchResponse parseResponse(Edm edm, Map<String, String> contentIdLocationMap, Olingo2BatchRequest request, BatchSingleResponse response)
         throws EntityProviderException, ODataApplicationException {
 
         // validate HTTP status
         final int statusCode = Integer.parseInt(response.getStatusCode());
         final String statusInfo = response.getStatusInfo();
 
-        final BasicHttpResponse httpResponse = new BasicHttpResponse(new BasicStatusLine(HttpVersion.HTTP_1_1,
-            statusCode, statusInfo));
+        final BasicHttpResponse httpResponse = new BasicHttpResponse(new BasicStatusLine(HttpVersion.HTTP_1_1, statusCode, statusInfo));
         final Map<String, String> headers = response.getHeaders();
         for (Map.Entry<String, String> entry : headers.entrySet()) {
             httpResponse.setHeader(entry.getKey(), entry.getValue());
@@ -1033,8 +938,7 @@ public final class Olingo2AppImpl implements Olingo2App {
             if (response.getBody() != null) {
                 String charset = Consts.UTF_8.toString();
                 try {
-                    final ContentType partContentType = receiveWithCharsetParameter(ContentType.parse(
-                        headers.get(HttpHeaders.CONTENT_TYPE)), Consts.UTF_8);
+                    final ContentType partContentType = receiveWithCharsetParameter(ContentType.parse(headers.get(HttpHeaders.CONTENT_TYPE)), Consts.UTF_8);
                     charset = partContentType.getCharset().toString();
                 } catch (ParseException | UnsupportedCharsetException ex) {
                     // Use default charset of UTF-8.
@@ -1048,13 +952,9 @@ public final class Olingo2AppImpl implements Olingo2App {
 
             AbstractFutureCallback.checkStatus(httpResponse);
         } catch (ODataApplicationException e) {
-            return new Olingo2BatchResponse(
-                statusCode, statusInfo, response.getContentId(),
-                response.getHeaders(), e);
+            return new Olingo2BatchResponse(statusCode, statusInfo, response.getContentId(), response.getHeaders(), e);
         } catch (UnsupportedEncodingException e) {
-            return new Olingo2BatchResponse(
-                statusCode, statusInfo, response.getContentId(),
-                response.getHeaders(), e);
+            return new Olingo2BatchResponse(statusCode, statusInfo, response.getContentId(), response.getHeaders(), e);
         }
 
         // resolve resource path and query params and parse batch part uri
@@ -1064,18 +964,15 @@ public final class Olingo2AppImpl implements Olingo2App {
             resolvedResourcePath = findLocation(resourcePath, contentIdLocationMap);
         } else {
             final String resourceLocation = response.getHeader(HttpHeaders.LOCATION);
-            resolvedResourcePath = resourceLocation != null
-                ? resourceLocation.substring(serviceUri.length()) : resourcePath;
+            resolvedResourcePath = resourceLocation != null ? resourceLocation.substring(serviceUri.length()) : resourcePath;
         }
-        final Map<String, String> resolvedQueryParams = request instanceof Olingo2BatchQueryRequest
-            ? ((Olingo2BatchQueryRequest) request).getQueryParams() : null;
+        final Map<String, String> resolvedQueryParams = request instanceof Olingo2BatchQueryRequest ? ((Olingo2BatchQueryRequest)request).getQueryParams() : null;
         final UriInfoWithType uriInfo = parseUri(edm, resolvedResourcePath, resolvedQueryParams);
 
         // resolve response content
         final Object resolvedContent = content != null ? readContent(uriInfo, content) : null;
 
-        return new Olingo2BatchResponse(statusCode, statusInfo, response.getContentId(), response.getHeaders(),
-            resolvedContent);
+        return new Olingo2BatchResponse(statusCode, statusInfo, response.getContentId(), response.getHeaders(), resolvedContent);
     }
 
     private ContentType receiveWithCharsetParameter(ContentType contentType, Charset charset) {
@@ -1083,8 +980,7 @@ public final class Olingo2AppImpl implements Olingo2App {
             return contentType;
         }
         final String mimeType = contentType.getMimeType();
-        if (mimeType.equals(ContentType.TEXT_PLAIN.getMimeType())
-            || AbstractFutureCallback.ODATA_MIME_TYPE.matcher(mimeType).matches()) {
+        if (mimeType.equals(ContentType.TEXT_PLAIN.getMimeType()) || AbstractFutureCallback.ODATA_MIME_TYPE.matcher(mimeType).matches()) {
             return contentType.withCharset(charset);
         }
         return contentType;
@@ -1095,8 +991,7 @@ public final class Olingo2AppImpl implements Olingo2App {
         if (pathSeparator == -1) {
             return contentIdLocationMap.get(resourcePath);
         } else {
-            return contentIdLocationMap.get(resourcePath.substring(0, pathSeparator))
-                + resourcePath.substring(pathSeparator);
+            return contentIdLocationMap.get(resourcePath.substring(0, pathSeparator)) + resourcePath.substring(pathSeparator);
         }
 
     }
@@ -1104,7 +999,7 @@ public final class Olingo2AppImpl implements Olingo2App {
     private String createBatchUri(Olingo2BatchRequest part) {
         String result;
         if (part instanceof Olingo2BatchQueryRequest) {
-            final Olingo2BatchQueryRequest queryPart = (Olingo2BatchQueryRequest) part;
+            final Olingo2BatchQueryRequest queryPart = (Olingo2BatchQueryRequest)part;
             result = createUri(queryPart.getResourcePath(), queryPart.getQueryParams());
         } else {
             result = createUri(part.getResourcePath());
@@ -1178,7 +1073,7 @@ public final class Olingo2AppImpl implements Olingo2App {
 
         return result;
     }
-    
+
     private static Map<String, String> headersToMap(final Header[] headers) {
         final Map<String, String> responseHeaders = new HashMap<>();
         for (Header header : headers) {
@@ -1186,17 +1081,15 @@ public final class Olingo2AppImpl implements Olingo2App {
         }
         return responseHeaders;
     }
-    
+
     /**
      * public for unit test, not to be used otherwise
      */
-    public void execute(final HttpUriRequest httpUriRequest, final ContentType contentType, 
-                        final Map<String, String> endpointHttpHeaders,
+    public void execute(final HttpUriRequest httpUriRequest, final ContentType contentType, final Map<String, String> endpointHttpHeaders,
                         final FutureCallback<HttpResponse> callback) {
 
         // add accept header when its not a form or multipart
-        if (!ContentType.APPLICATION_FORM_URLENCODED.getMimeType().equals(contentType.getMimeType())
-            && !contentType.getMimeType().startsWith(MULTIPART_MIME_TYPE)) {
+        if (!ContentType.APPLICATION_FORM_URLENCODED.getMimeType().equals(contentType.getMimeType()) && !contentType.getMimeType().startsWith(MULTIPART_MIME_TYPE)) {
             // otherwise accept what is being sent
             httpUriRequest.addHeader(HttpHeaders.ACCEPT, contentType.withCharset("").toString().toLowerCase());
             final Charset charset = contentType.getCharset();
@@ -1205,8 +1098,7 @@ public final class Olingo2AppImpl implements Olingo2App {
             }
         }
         // is something being sent?
-        if (httpUriRequest instanceof HttpEntityEnclosingRequestBase
-            && httpUriRequest.getFirstHeader(HttpHeaders.CONTENT_TYPE) == null) {
+        if (httpUriRequest instanceof HttpEntityEnclosingRequestBase && httpUriRequest.getFirstHeader(HttpHeaders.CONTENT_TYPE) == null) {
             httpUriRequest.addHeader(HttpHeaders.CONTENT_TYPE, contentType.toString());
         }
 
@@ -1216,7 +1108,7 @@ public final class Olingo2AppImpl implements Olingo2App {
                 httpUriRequest.setHeader(entry.getKey(), entry.getValue());
             }
         }
-        
+
         // set user specified endpoint headers
         if ((endpointHttpHeaders != null) && !endpointHttpHeaders.isEmpty()) {
             for (Map.Entry<String, String> entry : endpointHttpHeaders.entrySet()) {
@@ -1234,12 +1126,12 @@ public final class Olingo2AppImpl implements Olingo2App {
 
         // execute request
         if (client instanceof CloseableHttpAsyncClient) {
-            ((CloseableHttpAsyncClient) client).execute(httpUriRequest, callback);
+            ((CloseableHttpAsyncClient)client).execute(httpUriRequest, callback);
         } else {
             // invoke the callback methods explicitly after executing the
             // request synchronously
             try {
-                CloseableHttpResponse result = ((CloseableHttpClient) client).execute(httpUriRequest);
+                CloseableHttpResponse result = ((CloseableHttpClient)client).execute(httpUriRequest);
                 callback.completed(result);
             } catch (IOException e) {
                 callback.failed(e);
diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/SystemQueryOption.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/SystemQueryOption.java
index 45c247f..71e8d52 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/SystemQueryOption.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/SystemQueryOption.java
@@ -20,5 +20,5 @@ package org.apache.camel.component.olingo2.api.impl;
  * Copied from Olingo2 core package.
  */
 public enum SystemQueryOption {
-  $format, $filter, $inlinecount, $orderby, $skiptoken, $skip, $top, $expand, $select;
+    $format, $filter, $inlinecount, $orderby, $skiptoken, $skip, $top, $expand, $select;
 }
diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/UriInfoWithType.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/UriInfoWithType.java
index 0ccee6e..d3663f6 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/UriInfoWithType.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/UriInfoWithType.java
@@ -101,8 +101,7 @@ public class UriInfoWithType implements UriInfo {
                                 many = lastProperty.getMultiplicity() == EdmMultiplicity.MANY;
                             } else {
                                 final NavigationSegment lastSegment = segments.get(segments.size() - 1);
-                                many = lastSegment.getKeyPredicates().isEmpty()
-                                    && lastSegment.getNavigationProperty().getMultiplicity() == EdmMultiplicity.MANY;
+                                many = lastSegment.getKeyPredicates().isEmpty() && lastSegment.getNavigationProperty().getMultiplicity() == EdmMultiplicity.MANY;
                             }
                             if (isCount) {
                                 if (many) {
@@ -120,8 +119,7 @@ public class UriInfoWithType implements UriInfo {
                         }
                         break;
                     default:
-                        throw new ODataApplicationException("Unexpected property type " + targetKind,
-                            Locale.ENGLISH);
+                        throw new ODataApplicationException("Unexpected property type " + targetKind, Locale.ENGLISH);
                     }
                 }
             } else {
@@ -140,8 +138,7 @@ public class UriInfoWithType implements UriInfo {
                     uriType = UriType.URI10;
                     break;
                 default:
-                    throw new ODataApplicationException("Invalid function return type " + targetType,
-                        Locale.ENGLISH);
+                    throw new ODataApplicationException("Invalid function return type " + targetType, Locale.ENGLISH);
                 }
             }
         }
diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/UriType.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/UriType.java
index 4b8785a..901e4d6 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/UriType.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/UriType.java
@@ -29,9 +29,8 @@ public enum UriType {
     /**
      * Entity set
      */
-    URI1(SystemQueryOption.$format, SystemQueryOption.$filter, SystemQueryOption.$inlinecount,
-        SystemQueryOption.$orderby, SystemQueryOption.$skiptoken, SystemQueryOption.$skip, SystemQueryOption.$top,
-        SystemQueryOption.$expand, SystemQueryOption.$select),
+    URI1(SystemQueryOption.$format, SystemQueryOption.$filter, SystemQueryOption.$inlinecount, SystemQueryOption.$orderby, SystemQueryOption.$skiptoken, SystemQueryOption.$skip,
+        SystemQueryOption.$top, SystemQueryOption.$expand, SystemQueryOption.$select),
     /**
      * Entity set with key predicate
      */
@@ -55,9 +54,8 @@ public enum UriType {
     /**
      * Navigation property of an entity with target multiplicity '*'
      */
-    URI6B(SystemQueryOption.$format, SystemQueryOption.$filter, SystemQueryOption.$inlinecount,
-        SystemQueryOption.$orderby, SystemQueryOption.$skiptoken, SystemQueryOption.$skip, SystemQueryOption.$top,
-        SystemQueryOption.$expand, SystemQueryOption.$select),
+    URI6B(SystemQueryOption.$format, SystemQueryOption.$filter, SystemQueryOption.$inlinecount, SystemQueryOption.$orderby, SystemQueryOption.$skiptoken, SystemQueryOption.$skip,
+        SystemQueryOption.$top, SystemQueryOption.$expand, SystemQueryOption.$select),
     /**
      * Link to a single entity
      */
@@ -65,8 +63,8 @@ public enum UriType {
     /**
      * Link to multiple entities
      */
-    URI7B(SystemQueryOption.$format, SystemQueryOption.$filter, SystemQueryOption.$inlinecount,
-        SystemQueryOption.$orderby, SystemQueryOption.$skiptoken, SystemQueryOption.$skip, SystemQueryOption.$top),
+    URI7B(SystemQueryOption.$format, SystemQueryOption.$filter, SystemQueryOption.$inlinecount, SystemQueryOption.$orderby, SystemQueryOption.$skiptoken, SystemQueryOption.$skip,
+        SystemQueryOption.$top),
     /**
      * Metadata document
      */
diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2AppWrapper.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2AppWrapper.java
index c148484..f5fee4d 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2AppWrapper.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2AppWrapper.java
@@ -87,10 +87,9 @@ public class Olingo2AppWrapper {
                         final Exception ex = error[0];
                         if (ex != null) {
                             if (ex instanceof RuntimeCamelException) {
-                                throw (RuntimeCamelException) ex;
+                                throw (RuntimeCamelException)ex;
                             } else {
-                                final String message = ex.getMessage() != null
-                                    ? ex.getMessage() : ex.getClass().getName();
+                                final String message = ex.getMessage() != null ? ex.getMessage() : ex.getClass().getName();
                                 throw new RuntimeCamelException("Error reading EDM: " + message, ex);
                             }
                         }
diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Component.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Component.java
index 342f9b8..ed49da9 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Component.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Component.java
@@ -92,8 +92,7 @@ public class Olingo2Component extends AbstractApiComponent<Olingo2ApiName, Oling
     }
 
     @Override
-    protected Endpoint createEndpoint(String uri, String methodName, Olingo2ApiName apiName,
-                                      Olingo2Configuration endpointConfiguration) {
+    protected Endpoint createEndpoint(String uri, String methodName, Olingo2ApiName apiName, Olingo2Configuration endpointConfiguration) {
         endpointConfiguration.setApiName(apiName);
         endpointConfiguration.setMethodName(methodName);
         return new Olingo2Endpoint(uri, this, apiName, methodName, endpointConfiguration);
@@ -184,9 +183,9 @@ public class Olingo2Component extends AbstractApiComponent<Olingo2ApiName, Oling
 
         Olingo2AppImpl olingo2App;
         if (clientBuilder == null || clientBuilder instanceof HttpAsyncClientBuilder) {
-            olingo2App = new Olingo2AppImpl(configuration.getServiceUri(), (HttpAsyncClientBuilder) clientBuilder);
+            olingo2App = new Olingo2AppImpl(configuration.getServiceUri(), (HttpAsyncClientBuilder)clientBuilder);
         } else {
-            olingo2App = new Olingo2AppImpl(configuration.getServiceUri(), (HttpClientBuilder) clientBuilder);
+            olingo2App = new Olingo2AppImpl(configuration.getServiceUri(), (HttpClientBuilder)clientBuilder);
         }
         apiProxy = new Olingo2AppWrapper(olingo2App);
         apiProxy.getOlingo2App().setContentType(configuration.getContentType());
diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Configuration.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Configuration.java
index bbb45d4..ab1fb52 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Configuration.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Configuration.java
@@ -42,7 +42,8 @@ public class Olingo2Configuration {
     @UriPath
     @Metadata(required = true)
     private Olingo2ApiName apiName;
-    @UriPath @Metadata(required = true)
+    @UriPath
+    @Metadata(required = true)
     private String methodName;
     @UriParam
     private String serviceUri;
@@ -92,7 +93,8 @@ public class Olingo2Configuration {
     }
 
     /**
-     * Target OData service base URI, e.g. http://services.odata.org/OData/OData.svc
+     * Target OData service base URI, e.g.
+     * http://services.odata.org/OData/OData.svc
      */
     public void setServiceUri(String serviceUri) {
         this.serviceUri = serviceUri;
@@ -103,7 +105,8 @@ public class Olingo2Configuration {
     }
 
     /**
-     * Content-Type header value can be used to specify JSON or XML message format, defaults to application/json;charset=utf-8
+     * Content-Type header value can be used to specify JSON or XML message
+     * format, defaults to application/json;charset=utf-8
      */
     public void setContentType(String contentType) {
         this.contentType = contentType;
@@ -114,7 +117,8 @@ public class Olingo2Configuration {
     }
 
     /**
-     * Custom HTTP headers to inject into every request, this could include OAuth tokens, etc.
+     * Custom HTTP headers to inject into every request, this could include
+     * OAuth tokens, etc.
      */
     public void setHttpHeaders(Map<String, String> httpHeaders) {
         this.httpHeaders = httpHeaders;
@@ -125,7 +129,8 @@ public class Olingo2Configuration {
     }
 
     /**
-     * HTTP connection creation timeout in milliseconds, defaults to 30,000 (30 seconds)
+     * HTTP connection creation timeout in milliseconds, defaults to 30,000 (30
+     * seconds)
      */
     public void setConnectTimeout(int connectTimeout) {
         this.connectTimeout = connectTimeout;
@@ -169,8 +174,10 @@ public class Olingo2Configuration {
     }
 
     /**
-     * Custom HTTP async client builder for more complex HTTP client configuration, overrides connectionTimeout, socketTimeout, proxy and sslContext.
-     * Note that a socketTimeout MUST be specified in the builder, otherwise OData requests could block indefinitely
+     * Custom HTTP async client builder for more complex HTTP client
+     * configuration, overrides connectionTimeout, socketTimeout, proxy and
+     * sslContext. Note that a socketTimeout MUST be specified in the builder,
+     * otherwise OData requests could block indefinitely
      */
     public void setHttpAsyncClientBuilder(HttpAsyncClientBuilder httpAsyncClientBuilder) {
         this.httpAsyncClientBuilder = httpAsyncClientBuilder;
@@ -181,8 +188,10 @@ public class Olingo2Configuration {
     }
 
     /**
-     * Custom HTTP client builder for more complex HTTP client configuration, overrides connectionTimeout, socketTimeout, proxy and sslContext.
-     * Note that a socketTimeout MUST be specified in the builder, otherwise OData requests could block indefinitely
+     * Custom HTTP client builder for more complex HTTP client configuration,
+     * overrides connectionTimeout, socketTimeout, proxy and sslContext. Note
+     * that a socketTimeout MUST be specified in the builder, otherwise OData
+     * requests could block indefinitely
      */
     public void setHttpClientBuilder(HttpClientBuilder httpClientBuilder) {
         this.httpClientBuilder = httpClientBuilder;
@@ -196,7 +205,9 @@ public class Olingo2Configuration {
     }
 
     /**
-     * Set this to true to filter out results that have already been communicated by this component.
+     * Set this to true to filter out results that have already been
+     * communicated by this component.
+     * 
      * @param filterAlreadySeen
      */
     public void setFilterAlreadySeen(boolean filterAlreadySeen) {
@@ -205,33 +216,27 @@ public class Olingo2Configuration {
 
     @Override
     public int hashCode() {
-        return new HashCodeBuilder()
-            .append(serviceUri)
-            .append(contentType)
-            .append(httpHeaders)
-            .append(connectTimeout)
-            .append(socketTimeout)
-            .append(proxy)
-            .append(sslContextParameters)
-            .append(httpAsyncClientBuilder)
-            .append(httpClientBuilder)
-            .hashCode();
+        return new HashCodeBuilder().append(serviceUri).append(contentType).append(httpHeaders).append(connectTimeout).append(socketTimeout).append(proxy)
+            .append(sslContextParameters).append(httpAsyncClientBuilder).append(httpClientBuilder).hashCode();
     }
 
     @Override
     public boolean equals(Object obj) {
         if (obj instanceof Olingo2Configuration) {
-            Olingo2Configuration other = (Olingo2Configuration) obj;
-            return serviceUri == null ? other.serviceUri == null : serviceUri.equals(other.serviceUri)
-                && contentType == null ? other.contentType == null : contentType.equals(other.contentType)
-                && httpHeaders == null ? other.httpHeaders == null : httpHeaders.equals(other.httpHeaders)
-                && connectTimeout == other.connectTimeout
-                && socketTimeout == other.socketTimeout
-                && proxy == null ? other.proxy == null : proxy.equals(other.proxy)
-                && sslContextParameters == null ? other.sslContextParameters == null : sslContextParameters.equals(other.sslContextParameters)
-                && httpAsyncClientBuilder == null ? other.httpAsyncClientBuilder == null
-                : httpAsyncClientBuilder.equals(other.httpAsyncClientBuilder)
-                && httpClientBuilder == null ? other.httpClientBuilder == null : httpClientBuilder.equals(other.httpClientBuilder);
+            Olingo2Configuration other = (Olingo2Configuration)obj;
+            return serviceUri == null
+                ? other.serviceUri == null
+                : serviceUri.equals(other.serviceUri) && contentType == null
+                    ? other.contentType == null
+                    : contentType.equals(other.contentType) && httpHeaders == null
+                        ? other.httpHeaders == null
+                        : httpHeaders.equals(other.httpHeaders) && connectTimeout == other.connectTimeout && socketTimeout == other.socketTimeout && proxy == null
+                            ? other.proxy == null
+                            : proxy.equals(other.proxy) && sslContextParameters == null
+                                ? other.sslContextParameters == null
+                                : sslContextParameters.equals(other.sslContextParameters) && httpAsyncClientBuilder == null
+                                    ? other.httpAsyncClientBuilder == null : httpAsyncClientBuilder.equals(other.httpAsyncClientBuilder) && httpClientBuilder == null
+                                        ? other.httpClientBuilder == null : httpClientBuilder.equals(other.httpClientBuilder);
         }
         return false;
     }
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 ac0c5ee..e16bc62 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
@@ -84,7 +84,8 @@ public class Olingo2Consumer extends AbstractApiConsumer<Olingo2ApiName, Olingo2
 
             doInvokeMethod(args);
 
-            // guaranteed to return, since an exception on timeout is expected!!!
+            // guaranteed to return, since an exception on timeout is
+            // expected!!!
             latch.await();
 
             if (error[0] != null) {
@@ -92,10 +93,10 @@ public class Olingo2Consumer extends AbstractApiConsumer<Olingo2ApiName, Olingo2
             }
 
             //
-            // Allow consumer idle properties to properly handle an empty polling response
+            // Allow consumer idle properties to properly handle an empty
+            // polling response
             //
-            if ((result[0] == null)
-                || (result[0] instanceof ODataFeed && (((ODataFeed) result[0]).getEntries().isEmpty()))) {
+            if ((result[0] == null) || (result[0] instanceof ODataFeed && (((ODataFeed)result[0]).getEntries().isEmpty()))) {
                 return 0;
             } else {
                 int processed = ApiConsumerHelper.getResultsProcessed(this, result[0], isSplitResult());
@@ -110,7 +111,8 @@ public class Olingo2Consumer extends AbstractApiConsumer<Olingo2ApiName, Olingo2
     @Override
     public void interceptProperties(Map<String, Object> properties) {
         //
-        // If we have a filterAlreadySeen property then initialise the filter index
+        // If we have a filterAlreadySeen property then initialise the filter
+        // index
         //
         Object value = properties.get(Olingo2Endpoint.FILTER_ALREADY_SEEN);
         if (value == null) {
@@ -118,7 +120,8 @@ public class Olingo2Consumer extends AbstractApiConsumer<Olingo2ApiName, Olingo2
         }
 
         //
-        // Initialise the index if not already and if filterAlreadySeen has been set
+        // Initialise the index if not already and if filterAlreadySeen has been
+        // set
         //
         if (Boolean.parseBoolean(value.toString()) && resultIndex == null) {
             resultIndex = new Olingo2Index();
@@ -139,7 +142,7 @@ public class Olingo2Consumer extends AbstractApiConsumer<Olingo2ApiName, Olingo2
         List<Object> splitResult = new ArrayList<>();
 
         if (result instanceof ODataFeed) {
-            ODataFeed odataFeed = (ODataFeed) result;
+            ODataFeed odataFeed = (ODataFeed)result;
             for (ODataEntry entry : odataFeed.getEntries()) {
                 splitResult.add(entry);
             }
diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
index f6ec580..a1eff1c 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Endpoint.java
@@ -65,8 +65,7 @@ public class Olingo2Endpoint extends AbstractApiEndpoint<Olingo2ApiName, Olingo2
 
     private Olingo2AppWrapper apiProxy;
 
-    public Olingo2Endpoint(String uri, Olingo2Component component,
-                           Olingo2ApiName apiName, String methodName, Olingo2Configuration endpointConfiguration) {
+    public Olingo2Endpoint(String uri, Olingo2Component component, Olingo2ApiName apiName, String methodName, Olingo2Configuration endpointConfiguration) {
         super(uri, component, apiName, methodName, Olingo2ApiCollection.getCollection().getHelper(apiName), endpointConfiguration);
 
         this.configuration = endpointConfiguration;
@@ -122,8 +121,7 @@ public class Olingo2Endpoint extends AbstractApiEndpoint<Olingo2ApiName, Olingo2
     @Override
     protected void afterConfigureProperties() {
         // set default inBody
-        if (!(READ_METHOD.equals(methodName) || DELETE_METHOD.equals(methodName) || UREAD_METHOD.equals(methodName))
-            && inBody == null) {
+        if (!(READ_METHOD.equals(methodName) || DELETE_METHOD.equals(methodName) || UREAD_METHOD.equals(methodName)) && inBody == null) {
             inBody = DATA_PROPERTY;
         }
         createProxy();
@@ -136,7 +134,7 @@ public class Olingo2Endpoint extends AbstractApiEndpoint<Olingo2ApiName, Olingo2
 
     @Override
     public Olingo2Component getComponent() {
-        return (Olingo2Component) super.getComponent();
+        return (Olingo2Component)super.getComponent();
     }
 
     @Override
@@ -158,7 +156,8 @@ public class Olingo2Endpoint extends AbstractApiEndpoint<Olingo2ApiName, Olingo2
     @Override
     public void interceptPropertyNames(Set<String> propertyNames) {
         // add edm, and responseHandler property names
-        // edm is computed on first call to getApiProxy(), and responseHandler is provided by consumer and producer
+        // edm is computed on first call to getApiProxy(), and responseHandler
+        // is provided by consumer and producer
         if (!DELETE_METHOD.equals(methodName)) {
             propertyNames.add(EDM_PROPERTY);
         }
@@ -175,15 +174,14 @@ public class Olingo2Endpoint extends AbstractApiEndpoint<Olingo2ApiName, Olingo2
         properties.put(FILTER_ALREADY_SEEN, configuration.getFilterAlreadySeen());
 
         // handle keyPredicate
-        final String keyPredicate = (String) properties.get(KEY_PREDICATE_PROPERTY);
+        final String keyPredicate = (String)properties.get(KEY_PREDICATE_PROPERTY);
         if (keyPredicate != null) {
 
             // make sure a resource path is provided
-            final String resourcePath = (String) properties.get(RESOURCE_PATH_PROPERTY);
+            final String resourcePath = (String)properties.get(RESOURCE_PATH_PROPERTY);
             if (resourcePath == null) {
-                throw new IllegalArgumentException("Resource path must be provided in endpoint URI, or URI parameter '"
-                    + RESOURCE_PATH_PROPERTY + "', or exchange header '"
-                    + Olingo2Constants.PROPERTY_PREFIX + RESOURCE_PATH_PROPERTY + "'");
+                throw new IllegalArgumentException("Resource path must be provided in endpoint URI, or URI parameter '" + RESOURCE_PATH_PROPERTY + "', or exchange header '"
+                                                   + Olingo2Constants.PROPERTY_PREFIX + RESOURCE_PATH_PROPERTY + "'");
             }
 
             // append keyPredicate to dynamically create resource path
@@ -205,10 +203,10 @@ public class Olingo2Endpoint extends AbstractApiEndpoint<Olingo2ApiName, Olingo2
 
             final Map.Entry<String, Object> entry = it.next();
             final String paramName = entry.getKey();
-            
+
             /**
-             * Avoid swallowing consumer scheduler properties, which
-             * get processed in configureProperties()
+             * Avoid swallowing consumer scheduler properties, which get
+             * processed in configureProperties()
              */
             if (paramName.startsWith("consumer.")) {
                 continue;
@@ -230,7 +228,7 @@ public class Olingo2Endpoint extends AbstractApiEndpoint<Olingo2ApiName, Olingo2
         if (!queryParams.isEmpty()) {
 
             @SuppressWarnings("unchecked")
-            final Map<String, String> oldParams = (Map<String, String>) options.get(QUERY_PARAMS_PROPERTY);
+            final Map<String, String> oldParams = (Map<String, String>)options.get(QUERY_PARAMS_PROPERTY);
             if (oldParams == null) {
                 // set queryParams property
                 options.put(QUERY_PARAMS_PROPERTY, queryParams);
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 b541efe..91b81ef 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
@@ -212,7 +212,7 @@ public class Olingo2Index {
             }
             response = filter(result);
         } else if (response instanceof ODataEntry) {
-            response = filter((ODataEntry) response);
+            response = filter((ODataEntry)response);
         } else {
             response = filter(response);
         }
diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Producer.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Producer.java
index 1917671..95f3eca 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Producer.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Producer.java
@@ -65,11 +65,12 @@ public class Olingo2Producer extends AbstractApiProducer<Olingo2ApiName, Olingo2
                     response = resultIndex.filterResponse(response);
                 }
 
-                // producer returns a single response, even for methods with List return types
+                // producer returns a single response, even for methods with
+                // List return types
                 exchange.getOut().setBody(response);
                 // copy headers
                 exchange.getOut().setHeaders(exchange.getIn().getHeaders());
-                
+
                 // Add http response headers
                 exchange.getOut().setHeader(Olingo2Constants.PROPERTY_PREFIX + RESPONSE_HTTP_HEADERS, responseHeaders);
 
@@ -117,7 +118,8 @@ public class Olingo2Producer extends AbstractApiProducer<Olingo2ApiName, Olingo2
     @Override
     public void interceptProperties(Map<String, Object> properties) {
         //
-        // If we have a filterAlreadySeen property then initialise the filter index
+        // If we have a filterAlreadySeen property then initialise the filter
+        // index
         //
         Object value = properties.get(Olingo2Endpoint.FILTER_ALREADY_SEEN);
         if (value == null) {
@@ -125,7 +127,8 @@ public class Olingo2Producer extends AbstractApiProducer<Olingo2ApiName, Olingo2
         }
 
         //
-        // Initialise the index if not already and if filterAlreadySeen has been set
+        // Initialise the index if not already and if filterAlreadySeen has been
+        // set
         //
         if (Boolean.parseBoolean(value.toString()) && resultIndex == null) {
             resultIndex = new Olingo2Index();
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/AbstractOlingo2AppAPITestSupport.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/AbstractOlingo2AppAPITestSupport.java
index dc3ae9f..2bf45ec 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/AbstractOlingo2AppAPITestSupport.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/AbstractOlingo2AppAPITestSupport.java
@@ -1,11 +1,12 @@
 /*
- * Copyright (C) 2016 Red Hat, Inc.
+ * 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
  *
- * Licensed 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
+ *      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,
@@ -15,8 +16,6 @@
  */
 package org.apache.camel.component.olingo2;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 import java.text.DateFormat;
 import java.util.Calendar;
 import java.util.Date;
@@ -35,6 +34,10 @@ import org.apache.olingo.odata2.api.ep.feed.ODataFeed;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+// CHECKSTYLE:OFF
 public class AbstractOlingo2AppAPITestSupport {
 
     protected static final String SERVICE_NAME = "MyFormula.svc";
@@ -109,15 +112,15 @@ public class AbstractOlingo2AppAPITestSupport {
             Object value = entry.getValue();
             if (value instanceof Map) {
                 @SuppressWarnings("unchecked")
-                final Map<String, Object> objectMap = (Map<String, Object>) value;
+                final Map<String, Object> objectMap = (Map<String, Object>)value;
                 value = prettyPrint(objectMap, level + 1);
                 b.append(value).append(NEW_LINE);
             } else if (value instanceof Calendar) {
-                Calendar cal = (Calendar) value;
+                Calendar cal = (Calendar)value;
                 value = DateFormat.getInstance().format(cal.getTime());
                 b.append(value).append(NEW_LINE);
             } else if (value instanceof ODataDeltaFeed) {
-                ODataDeltaFeed feed = (ODataDeltaFeed) value;
+                ODataDeltaFeed feed = (ODataDeltaFeed)value;
                 List<ODataEntry> inlineEntries = feed.getEntries();
                 b.append("{");
                 for (ODataEntry oDataEntry : inlineEntries) {
@@ -147,9 +150,9 @@ public class AbstractOlingo2AppAPITestSupport {
             this.response = response;
             if (LOG.isDebugEnabled()) {
                 if (response instanceof ODataFeed) {
-                    LOG.debug("Received response: {}", prettyPrint((ODataFeed) response));
+                    LOG.debug("Received response: {}", prettyPrint((ODataFeed)response));
                 } else if (response instanceof ODataEntry) {
-                    LOG.debug("Received response: {}", prettyPrint((ODataEntry) response));
+                    LOG.debug("Received response: {}", prettyPrint((ODataEntry)response));
                 } else {
                     LOG.debug("Received response: {}", response);
                 }
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/AbstractOlingo2TestSupport.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/AbstractOlingo2TestSupport.java
index 8bb4343..c36fe76 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/AbstractOlingo2TestSupport.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/AbstractOlingo2TestSupport.java
@@ -27,7 +27,8 @@ import org.apache.camel.support.PropertyBindingSupport;
 import org.apache.camel.test.junit4.CamelTestSupport;
 
 /**
- * Abstract base class for Olingo Integration tests generated by Camel API component maven plugin.
+ * Abstract base class for Olingo Integration tests generated by Camel API
+ * component maven plugin.
  */
 public class AbstractOlingo2TestSupport extends CamelTestSupport {
 
@@ -47,8 +48,7 @@ public class AbstractOlingo2TestSupport extends CamelTestSupport {
         try {
             properties.load(getClass().getResourceAsStream(TEST_OPTIONS_PROPERTIES));
         } catch (Exception e) {
-            throw new IOException(String.format("%s could not be loaded: %s", TEST_OPTIONS_PROPERTIES, e.getMessage()),
-                e);
+            throw new IOException(String.format("%s could not be loaded: %s", TEST_OPTIONS_PROPERTIES, e.getMessage()), e);
         }
 
         Map<String, Object> options = new HashMap<>();
@@ -74,13 +74,12 @@ public class AbstractOlingo2TestSupport extends CamelTestSupport {
     }
 
     @SuppressWarnings("unchecked")
-    protected <T> T requestBodyAndHeaders(String endpointUri, Object body, Map<String, Object> headers)
-        throws CamelExecutionException {
-        return (T) template().requestBodyAndHeaders(endpointUri, body, headers);
+    protected <T> T requestBodyAndHeaders(String endpointUri, Object body, Map<String, Object> headers) throws CamelExecutionException {
+        return (T)template().requestBodyAndHeaders(endpointUri, body, headers);
     }
 
     @SuppressWarnings("unchecked")
     protected <T> T requestBody(String endpoint, Object body) throws CamelExecutionException {
-        return (T) template().requestBody(endpoint, body);
+        return (T)template().requestBody(endpoint, body);
     }
 }
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPIETagEnabledTest.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPIETagEnabledTest.java
index 9eb274a..2aaa0cb 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPIETagEnabledTest.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPIETagEnabledTest.java
@@ -1,11 +1,12 @@
 /*
- * Copyright (C) 2016 Red Hat, Inc.
+ * 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
  *
- * Licensed 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
+ *      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,
@@ -15,12 +16,15 @@
  */
 package org.apache.camel.component.olingo2;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
 import java.io.InputStream;
 import java.util.Map;
 import javax.ws.rs.HttpMethod;
+import okhttp3.HttpUrl;
+import okhttp3.mockwebserver.Dispatcher;
+import okhttp3.mockwebserver.MockResponse;
+import okhttp3.mockwebserver.MockWebServer;
+import okhttp3.mockwebserver.RecordedRequest;
+import okio.Buffer;
 import org.apache.camel.component.olingo2.api.Olingo2App;
 import org.apache.camel.component.olingo2.api.impl.Olingo2AppImpl;
 import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
@@ -38,26 +42,19 @@ import org.eclipse.jetty.http.HttpHeader;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import okhttp3.HttpUrl;
-import okhttp3.mockwebserver.Dispatcher;
-import okhttp3.mockwebserver.MockResponse;
-import okhttp3.mockwebserver.MockWebServer;
-import okhttp3.mockwebserver.RecordedRequest;
-import okio.Buffer;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
 
 /**
- * Tests support for concurrency properties which generate and require
- * reading eTags before patch, update and delete operations.
- *
- * Since the embedded olingo2 odata service does not contain any
- * concurrency properties, it is necessary to mock up a new server.
- *
- * Uses a cutdown version of the reference odata service and adds in
- * extra concurrency properties.
- *
- * Service's dispatcher only tests the correct calls are made and whether
- * the eTags are correctly added as headers to the requisite requests.
- *
+ * Tests support for concurrency properties which generate and require reading
+ * eTags before patch, update and delete operations. Since the embedded olingo2
+ * odata service does not contain any concurrency properties, it is necessary to
+ * mock up a new server. Uses a cutdown version of the reference odata service
+ * and adds in extra concurrency properties. Service's dispatcher only tests the
+ * correct calls are made and whether the eTags are correctly added as headers
+ * to the requisite requests.
  */
 public class Olingo2AppAPIETagEnabledTest extends AbstractOlingo2AppAPITestSupport {
 
@@ -98,7 +95,7 @@ public class Olingo2AppAPIETagEnabledTest extends AbstractOlingo2AppAPITestSuppo
         //
         // Check we have enabled eTag properties
         //
-        EdmProperty property = (EdmProperty) entityType.getProperty("Id");
+        EdmProperty property = (EdmProperty)entityType.getProperty("Id");
         assertNotNull(property.getFacets());
     }
 
@@ -109,57 +106,55 @@ public class Olingo2AppAPIETagEnabledTest extends AbstractOlingo2AppAPITestSuppo
         //
         server.setDispatcher(new Dispatcher() {
 
-            @SuppressWarnings( "resource" )
+            @SuppressWarnings("resource")
             @Override
             public MockResponse dispatch(RecordedRequest recordedRequest) throws InterruptedException {
                 MockResponse mockResponse = new MockResponse();
 
-                switch(recordedRequest.getMethod()) {
-                    case HttpMethod.GET:
-                        try {
-                            if (recordedRequest.getPath().endsWith("/" + TEST_CREATE_MANUFACTURER)) {
-
-                                ODataResponse odataResponse = EntityProvider.writeEntry(TEST_FORMAT.getMimeType(),
-                                                                                        manufacturersSet, getEntityData(),
-                                                                                        EntityProviderWriteProperties
-                                                                                            .serviceRoot(getServiceUrl().uri())
-                                                                                            .build());
-                                InputStream entityStream = odataResponse.getEntityAsStream();
-                                mockResponse.setResponseCode(HttpStatusCodes.OK.getStatusCode());
-                                mockResponse.setBody(new Buffer().readFrom(entityStream));
-                                return mockResponse;
+                switch (recordedRequest.getMethod()) {
+                case HttpMethod.GET:
+                    try {
+                        if (recordedRequest.getPath().endsWith("/" + TEST_CREATE_MANUFACTURER)) {
+
+                            ODataResponse odataResponse = EntityProvider.writeEntry(TEST_FORMAT.getMimeType(), manufacturersSet, getEntityData(),
+                                                                                    EntityProviderWriteProperties.serviceRoot(getServiceUrl().uri()).build());
+                            InputStream entityStream = odataResponse.getEntityAsStream();
+                            mockResponse.setResponseCode(HttpStatusCodes.OK.getStatusCode());
+                            mockResponse.setBody(new Buffer().readFrom(entityStream));
+                            return mockResponse;
 
                         } else if (recordedRequest.getPath().endsWith("/" + Olingo2AppImpl.METADATA)) {
 
                             EdmServiceMetadata serviceMetadata = edm.getServiceMetadata();
-                            return mockResponse
-                                .setResponseCode(HttpStatusCodes.OK.getStatusCode())
+                            return mockResponse.setResponseCode(HttpStatusCodes.OK.getStatusCode())
                                 .addHeader(ODataHttpHeaders.DATASERVICEVERSION, serviceMetadata.getDataServiceVersion())
                                 .setBody(new Buffer().readFrom(serviceMetadata.getMetadata()));
                         }
 
-                        } catch (Exception ex) {
-                            throw new RuntimeException(ex);
-                        }
-                        break;
-                    case HttpMethod.PATCH:
-                    case HttpMethod.PUT:
-                    case HttpMethod.POST:
-                    case HttpMethod.DELETE:
-                        //
-                        // Objective of the test:
-                        //   The Read has to have been called by Olingo2AppImpl.argumentWithETag
-                        //    which should then populate the IF-MATCH header with the eTag value.
-                        //    Verify the eTag value is present.
-                        //
-                        assertNotNull(recordedRequest.getHeader(HttpHeader.IF_MATCH.asString()));
-
-                        return mockResponse.setResponseCode(HttpStatusCodes.NO_CONTENT.getStatusCode());
+                    } catch (Exception ex) {
+                        throw new RuntimeException(ex);
+                    }
+                    break;
+                case HttpMethod.PATCH:
+                case HttpMethod.PUT:
+                case HttpMethod.POST:
+                case HttpMethod.DELETE:
+                    //
+                    // Objective of the test:
+                    // The Read has to have been called by
+                    // Olingo2AppImpl.argumentWithETag
+                    // which should then populate the IF-MATCH header with the
+                    // eTag value.
+                    // Verify the eTag value is present.
+                    //
+                    assertNotNull(recordedRequest.getHeader(HttpHeader.IF_MATCH.asString()));
+
+                    return mockResponse.setResponseCode(HttpStatusCodes.NO_CONTENT.getStatusCode());
+                default:
+                    break;
                 }
 
-                mockResponse
-                    .setResponseCode(HttpStatusCodes.NOT_FOUND.getStatusCode())
-                    .setBody("{ status: \"Not Found\"}");
+                mockResponse.setResponseCode(HttpStatusCodes.NOT_FOUND.getStatusCode()).setBody("{ status: \"Not Found\"}");
                 return mockResponse;
             }
         });
@@ -187,7 +182,7 @@ public class Olingo2AppAPIETagEnabledTest extends AbstractOlingo2AppAPITestSuppo
 
         Map<String, Object> data = getEntityData();
         @SuppressWarnings("unchecked")
-        Map<String, Object> address = (Map<String, Object>) data.get(ADDRESS);
+        Map<String, Object> address = (Map<String, Object>)data.get(ADDRESS);
 
         data.put("Name", "MyCarManufacturer Renamed");
         address.put("Street", "Main Street");
@@ -207,7 +202,7 @@ public class Olingo2AppAPIETagEnabledTest extends AbstractOlingo2AppAPITestSuppo
 
         Map<String, Object> data = getEntityData();
         @SuppressWarnings("unchecked")
-        Map<String, Object> address = (Map<String, Object>) data.get(ADDRESS);
+        Map<String, Object> address = (Map<String, Object>)data.get(ADDRESS);
 
         data.put("Name", "MyCarManufacturer Renamed");
         address.put("Street", "Main Street");
@@ -227,7 +222,7 @@ public class Olingo2AppAPIETagEnabledTest extends AbstractOlingo2AppAPITestSuppo
 
         Map<String, Object> data = getEntityData();
         @SuppressWarnings("unchecked")
-        Map<String, Object> address = (Map<String, Object>) data.get(ADDRESS);
+        Map<String, Object> address = (Map<String, Object>)data.get(ADDRESS);
 
         data.put("Name", "MyCarManufacturer Renamed");
         address.put("Street", "Main Street");
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPITest.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPITest.java
index 1c1f281..210df3d 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPITest.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPITest.java
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 package org.apache.camel.component.olingo2;
+
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Calendar;
@@ -50,8 +51,9 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
 
 /**
- * Integration test for {@link org.apache.camel.component.olingo2.api.impl.Olingo2AppImpl}
- * using the sample Olingo2 Server dynamically downloaded and started during the test.
+ * Integration test for
+ * {@link org.apache.camel.component.olingo2.api.impl.Olingo2AppImpl} using the
+ * sample Olingo2 Server dynamically downloaded and started during the test.
  */
 public class Olingo2AppAPITest extends AbstractOlingo2AppAPITestSupport {
 
@@ -107,8 +109,7 @@ public class Olingo2AppAPITest extends AbstractOlingo2AppAPITestSupport {
 
     @Test
     public void testServiceDocument() throws Exception {
-        final TestOlingo2ResponseHandler<ServiceDocument> responseHandler =
-            new TestOlingo2ResponseHandler<>();
+        final TestOlingo2ResponseHandler<ServiceDocument> responseHandler = new TestOlingo2ResponseHandler<>();
 
         olingoApp.read(null, "", null, null, responseHandler);
 
@@ -141,9 +142,8 @@ public class Olingo2AppAPITest extends AbstractOlingo2AppAPITestSupport {
 
         final InputStream rawfeed = responseHandler.await();
         assertNotNull("Data feed", rawfeed);
-        // for this test, we just let EP to verify the stream data 
-        final ODataFeed dataFeed = EntityProvider.readFeed(TEST_FORMAT_STRING, edmEntitySetMap.get(MANUFACTURERS), 
-                                                           rawfeed, EntityProviderReadProperties.init().build());
+        // for this test, we just let EP to verify the stream data
+        final ODataFeed dataFeed = EntityProvider.readFeed(TEST_FORMAT_STRING, edmEntitySetMap.get(MANUFACTURERS), rawfeed, EntityProviderReadProperties.init().build());
         LOG.info("Entries:  {}", prettyPrint(dataFeed));
     }
 
@@ -177,16 +177,14 @@ public class Olingo2AppAPITest extends AbstractOlingo2AppAPITestSupport {
 
         olingoApp.uread(edm, TEST_MANUFACTURER, null, null, responseHandler);
         InputStream rawentry = responseHandler.await();
-        ODataEntry entry = EntityProvider.readEntry(TEST_FORMAT_STRING, edmEntitySetMap.get(MANUFACTURERS), 
-                                                    rawentry, EntityProviderReadProperties.init().build());
+        ODataEntry entry = EntityProvider.readEntry(TEST_FORMAT_STRING, edmEntitySetMap.get(MANUFACTURERS), rawentry, EntityProviderReadProperties.init().build());
         LOG.info("Single Entry:  {}", prettyPrint(entry));
 
         responseHandler.reset();
 
         olingoApp.uread(edm, TEST_CAR, null, null, responseHandler);
         rawentry = responseHandler.await();
-        entry = EntityProvider.readEntry(TEST_FORMAT_STRING, edmEntitySetMap.get(CARS),
-                                         rawentry, EntityProviderReadProperties.init().build());
+        entry = EntityProvider.readEntry(TEST_FORMAT_STRING, edmEntitySetMap.get(CARS), rawentry, EntityProviderReadProperties.init().build());
         LOG.info("Single Entry:  {}", prettyPrint(entry));
 
         responseHandler.reset();
@@ -196,20 +194,18 @@ public class Olingo2AppAPITest extends AbstractOlingo2AppAPITestSupport {
         olingoApp.uread(edm, TEST_MANUFACTURER, queryParams, null, responseHandler);
 
         rawentry = responseHandler.await();
-        ODataEntry entryExpanded = EntityProvider.readEntry(TEST_FORMAT_STRING, edmEntitySetMap.get(MANUFACTURERS), 
-                                                            rawentry, EntityProviderReadProperties.init().build());
+        ODataEntry entryExpanded = EntityProvider.readEntry(TEST_FORMAT_STRING, edmEntitySetMap.get(MANUFACTURERS), rawentry, EntityProviderReadProperties.init().build());
         LOG.info("Single Entry with expanded Cars relation:  {}", prettyPrint(entryExpanded));
     }
 
     @Test
     public void testReadUpdateProperties() throws Exception {
         // test simple property Manufacturer.Founded
-        final TestOlingo2ResponseHandler<Map<String, Object>> propertyHandler =
-            new TestOlingo2ResponseHandler<>();
+        final TestOlingo2ResponseHandler<Map<String, Object>> propertyHandler = new TestOlingo2ResponseHandler<>();
 
         olingoApp.read(edm, TEST_MANUFACTURER_FOUNDED_PROPERTY, null, null, propertyHandler);
 
-        Calendar founded = (Calendar) propertyHandler.await().get(FOUNDED_PROPERTY);
+        Calendar founded = (Calendar)propertyHandler.await().get(FOUNDED_PROPERTY);
         LOG.info("Founded property {}", founded);
 
         final TestOlingo2ResponseHandler<Calendar> valueHandler = new TestOlingo2ResponseHandler<>();
@@ -219,8 +215,7 @@ public class Olingo2AppAPITest extends AbstractOlingo2AppAPITestSupport {
         founded = valueHandler.await();
         LOG.info("Founded property {}", founded);
 
-        final TestOlingo2ResponseHandler<HttpStatusCodes> statusHandler =
-            new TestOlingo2ResponseHandler<>();
+        final TestOlingo2ResponseHandler<HttpStatusCodes> statusHandler = new TestOlingo2ResponseHandler<>();
         final HashMap<String, Object> properties = new HashMap<>();
         properties.put(FOUNDED_PROPERTY, new Date());
 
@@ -278,51 +273,38 @@ public class Olingo2AppAPITest extends AbstractOlingo2AppAPITestSupport {
         LOG.info("Read link: {}", link);
 
 //Deleting relationships through links is not supported in Olingo2 at the time of writing this test
-/*
-        final TestOlingo2ResponseHandler<HttpStatusCodes> statusHandler =
-            new TestOlingo2ResponseHandler<HttpStatusCodes>();
-
-        final ArrayList<Map<String, Object>> carKeys = new ArrayList<Map<String, Object>>();
-        for (String carLink : links) {
-            final Matcher matcher = LINK_PATTERN.matcher(carLink);
-            assertTrue("Link pattern " + carLink, matcher.matches());
-            final String carId = matcher.group(1);
-
-            final HashMap<String, Object> keys = new HashMap<String, Object>();
-            keys.put(ID_PROPERTY, carId);
-            carKeys.add(keys);
-
-            // delete manufacturer->car link
-            statusHandler.reset();
-            final String resourcePath = TEST_MANUFACTURER_LINKS_CARS + "('" + carId + "')";
-            olingoApp.delete(resourcePath, statusHandler);
-
-            assertEquals("Delete car link " + resourcePath, HttpStatusCodes.OK.getStatusCode(),
-                statusHandler.await().getStatusCode());
-        }
-
-        // add links to all Cars
-        statusHandler.reset();
-        olingoApp.create(edm, TEST_MANUFACTURER_LINKS_CARS, carKeys, statusHandler);
-
-        assertEquals("Links update", HttpStatusCodes.ACCEPTED.getStatusCode(), statusHandler.await().getStatusCode());
-
-        // delete car->manufacturer link
-        statusHandler.reset();
-        olingoApp.delete(TEST_CAR_LINK_MANUFACTURER, statusHandler);
-
-        assertEquals("Delete manufacturer link " + TEST_CAR_LINK_MANUFACTURER, HttpStatusCodes.OK.getStatusCode(),
-            statusHandler.await().getStatusCode());
-
-        // add link to Manufacturer
-        statusHandler.reset();
-        final HashMap<String, Object> manufacturerKey = new HashMap<String, Object>();
-        manufacturerKey.put(ID_PROPERTY, "1");
-
-        olingoApp.create(edm, TEST_CAR_LINK_MANUFACTURER, manufacturerKey, statusHandler);
-
-        assertEquals("Link update", HttpStatusCodes.ACCEPTED.getStatusCode(), statusHandler.await().getStatusCode());
-*/
+        /*
+         * final TestOlingo2ResponseHandler<HttpStatusCodes> statusHandler = new
+         * TestOlingo2ResponseHandler<HttpStatusCodes>(); final
+         * ArrayList<Map<String, Object>> carKeys = new ArrayList<Map<String,
+         * Object>>(); for (String carLink : links) { final Matcher matcher =
+         * LINK_PATTERN.matcher(carLink); assertTrue("Link pattern " + carLink,
+         * matcher.matches()); final String carId = matcher.group(1); final
+         * HashMap<String, Object> keys = new HashMap<String, Object>();
+         * keys.put(ID_PROPERTY, carId); carKeys.add(keys); // delete
+         * manufacturer->car link statusHandler.reset(); final String
+         * resourcePath = TEST_MANUFACTURER_LINKS_CARS + "('" + carId + "')";
+         * olingoApp.delete(resourcePath, statusHandler);
+         * assertEquals("Delete car link " + resourcePath,
+         * HttpStatusCodes.OK.getStatusCode(),
+         * statusHandler.await().getStatusCode()); } // add links to all Cars
+         * statusHandler.reset(); olingoApp.create(edm,
+         * TEST_MANUFACTURER_LINKS_CARS, carKeys, statusHandler);
+         * assertEquals("Links update",
+         * HttpStatusCodes.ACCEPTED.getStatusCode(),
+         * statusHandler.await().getStatusCode()); // delete car->manufacturer
+         * link statusHandler.reset();
+         * olingoApp.delete(TEST_CAR_LINK_MANUFACTURER, statusHandler);
+         * assertEquals("Delete manufacturer link " +
+         * TEST_CAR_LINK_MANUFACTURER, HttpStatusCodes.OK.getStatusCode(),
+         * statusHandler.await().getStatusCode()); // add link to Manufacturer
+         * statusHandler.reset(); final HashMap<String, Object> manufacturerKey
+         * = new HashMap<String, Object>(); manufacturerKey.put(ID_PROPERTY,
+         * "1"); olingoApp.create(edm, TEST_CAR_LINK_MANUFACTURER,
+         * manufacturerKey, statusHandler); assertEquals("Link update",
+         * HttpStatusCodes.ACCEPTED.getStatusCode(),
+         * statusHandler.await().getStatusCode());
+         */
     }
 
     @Test
@@ -362,12 +344,11 @@ public class Olingo2AppAPITest extends AbstractOlingo2AppAPITestSupport {
 
         Map<String, Object> data = getEntityData();
         @SuppressWarnings("unchecked")
-        Map<String, Object> address = (Map<String, Object>) data.get(ADDRESS);
+        Map<String, Object> address = (Map<String, Object>)data.get(ADDRESS);
 
         data.put("Name", "MyCarManufacturer Renamed");
         address.put("Street", "Main Street");
-        final TestOlingo2ResponseHandler<HttpStatusCodes> statusHandler =
-            new TestOlingo2ResponseHandler<>();
+        final TestOlingo2ResponseHandler<HttpStatusCodes> statusHandler = new TestOlingo2ResponseHandler<>();
 
         olingoApp.update(edm, TEST_CREATE_MANUFACTURER, null, data, statusHandler);
         statusHandler.await();
@@ -423,24 +404,21 @@ public class Olingo2AppAPITest extends AbstractOlingo2AppAPITestSupport {
 
         // create
         final Map<String, Object> data = getEntityData();
-        batchParts.add(Olingo2BatchChangeRequest.resourcePath(MANUFACTURERS).
-            contentId(TEST_RESOURCE_CONTENT_ID).operation(Operation.CREATE).body(data).build());
+        batchParts.add(Olingo2BatchChangeRequest.resourcePath(MANUFACTURERS).contentId(TEST_RESOURCE_CONTENT_ID).operation(Operation.CREATE).body(data).build());
 
         // update
         final Map<String, Object> updateData = new HashMap<>(data);
         @SuppressWarnings("unchecked")
-        Map<String, Object> address = (Map<String, Object>) updateData.get(ADDRESS);
+        Map<String, Object> address = (Map<String, Object>)updateData.get(ADDRESS);
         updateData.put("Name", "MyCarManufacturer Renamed");
         address.put("Street", "Main Street");
 
-        batchParts.add(Olingo2BatchChangeRequest.resourcePath(TEST_RESOURCE).operation(Operation.UPDATE)
-            .body(updateData).build());
+        batchParts.add(Olingo2BatchChangeRequest.resourcePath(TEST_RESOURCE).operation(Operation.UPDATE).body(updateData).build());
 
         // delete
         batchParts.add(Olingo2BatchChangeRequest.resourcePath(TEST_RESOURCE).operation(Operation.DELETE).build());
 
-        final TestOlingo2ResponseHandler<List<Olingo2BatchResponse>> responseHandler =
-            new TestOlingo2ResponseHandler<>();
+        final TestOlingo2ResponseHandler<List<Olingo2BatchResponse>> responseHandler = new TestOlingo2ResponseHandler<>();
 
         // read to verify delete
         batchParts.add(Olingo2BatchQueryRequest.resourcePath(TEST_CREATE_MANUFACTURER).build());
@@ -451,19 +429,19 @@ public class Olingo2AppAPITest extends AbstractOlingo2AppAPITestSupport {
         assertEquals("Batch responses expected", 8, responseParts.size());
 
         assertNotNull(responseParts.get(0).getBody());
-        final ODataFeed feed = (ODataFeed) responseParts.get(1).getBody();
+        final ODataFeed feed = (ODataFeed)responseParts.get(1).getBody();
         assertNotNull(feed);
         LOG.info("Batch feed:  {}", prettyPrint(feed));
 
-        ODataEntry dataEntry = (ODataEntry) responseParts.get(2).getBody();
+        ODataEntry dataEntry = (ODataEntry)responseParts.get(2).getBody();
         assertNotNull(dataEntry);
         LOG.info("Batch read entry:  {}", prettyPrint(dataEntry));
 
-        dataEntry = (ODataEntry) responseParts.get(3).getBody();
+        dataEntry = (ODataEntry)responseParts.get(3).getBody();
         assertNotNull(dataEntry);
         LOG.info("Batch read entry with expand:  {}", prettyPrint(dataEntry));
 
-        dataEntry = (ODataEntry) responseParts.get(4).getBody();
+        dataEntry = (ODataEntry)responseParts.get(4).getBody();
         assertNotNull(dataEntry);
         LOG.info("Batch create entry:  {}", prettyPrint(dataEntry));
 
@@ -471,7 +449,7 @@ public class Olingo2AppAPITest extends AbstractOlingo2AppAPITestSupport {
         assertEquals(HttpStatusCodes.NO_CONTENT.getStatusCode(), responseParts.get(6).getStatusCode());
 
         assertEquals(HttpStatusCodes.NOT_FOUND.getStatusCode(), responseParts.get(7).getStatusCode());
-        final Exception exception = (Exception) responseParts.get(7).getBody();
+        final Exception exception = (Exception)responseParts.get(7).getBody();
         assertNotNull(exception);
         LOG.info("Batch retrieve deleted entry:  {}", exception);
     }
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
index 0af1b81..c817b1d 100644
--- 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
@@ -27,10 +27,11 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 /**
- * Test class for {@link org.apache.camel.component.olingo2.api.Olingo2App} APIs.
+ * 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.
+ * 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 {
@@ -69,16 +70,14 @@ public class Olingo2ComponentConsumerTest 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
+     * 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 {
@@ -89,9 +88,7 @@ public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
 
         RouteBuilder builder = new RouteBuilder() {
             public void configure() {
-                from("olingo2://read/Manufacturers?filterAlreadySeen=true&"
-                        + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&"
-                        + "consumer.splitResult=false")
+                from("olingo2://read/Manufacturers?filterAlreadySeen=true&" + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&" + "consumer.splitResult=false")
                     .to("mock:consumer-alreadyseen");
             };
         };
@@ -107,7 +104,7 @@ public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
                 // First polled messages contained all the manufacturers
                 //
                 assertTrue(body instanceof ODataFeed);
-                ODataFeed set = (ODataFeed) body;
+                ODataFeed set = (ODataFeed)body;
                 assertTrue(set.getEntries().size() > 0);
             } else {
                 //
@@ -120,16 +117,13 @@ public class Olingo2ComponentConsumerTest 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.
-     * - consumer.sendEmptyMessageWhenIdle is set to false so only 1 message should
-     *   even be returned.
+     * 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. -
+     * consumer.sendEmptyMessageWhenIdle is set to false so only 1 message
+     * should even be returned.
      */
     @Test
     public void testConsumerReadFilterAlreadySeenNoEmptyMsgs() throws Exception {
@@ -144,9 +138,7 @@ public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
 
         RouteBuilder builder = new RouteBuilder() {
             public void configure() {
-                from("olingo2://read/Manufacturers?filterAlreadySeen=true&"
-                + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=false&"
-                + "consumer.splitResult=false")
+                from("olingo2://read/Manufacturers?filterAlreadySeen=true&" + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=false&" + "consumer.splitResult=false")
                     .to("mock:consumer-alreadyseen");
             };
         };
@@ -166,14 +158,12 @@ public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
         // Only polled message contains all the entities
         //
         assertTrue(body instanceof ODataFeed);
-        ODataFeed set = (ODataFeed) body;
+        ODataFeed set = (ODataFeed)body;
         assertTrue(set.getEntries().size() > 0);
     }
 
     /**
-     * WithPredicate in address
-     * FilterAlreadySeen: true
-     * SplitResults: true
+     * WithPredicate in address FilterAlreadySeen: true SplitResults: true
      * consumer.sendEmptyMessageWhenIdle: true
      *
      * @throws Exception
@@ -186,9 +176,7 @@ public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
 
         RouteBuilder builder = new RouteBuilder() {
             public void configure() {
-                from("olingo2://read/Manufacturers('1')?filterAlreadySeen=true&"
-                        + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&"
-                        + "consumer.splitResult=true")
+                from("olingo2://read/Manufacturers('1')?filterAlreadySeen=true&" + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&" + "consumer.splitResult=true")
                     .to("mock:consumer-splitresult-kp-manufacturer");
             };
         };
@@ -204,7 +192,7 @@ public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
                 // First polled messages contained all the entities
                 //
                 assertTrue(body instanceof ODataEntry);
-                ODataEntry entry = (ODataEntry) body;
+                ODataEntry entry = (ODataEntry)body;
                 Object nameValue = entry.getProperties().get("Name");
                 assertNotNull(nameValue);
                 assertEquals("Star Powered Racing", nameValue.toString());
@@ -219,9 +207,7 @@ public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
     }
 
     /**
-     * WithPredicate in address
-     * FilterAlreadySeen: true
-     * SplitResults: true
+     * WithPredicate in address FilterAlreadySeen: true SplitResults: true
      * consumer.sendEmptyMessageWhenIdle: false
      *
      * @throws Exception
@@ -240,9 +226,7 @@ public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
 
         RouteBuilder builder = new RouteBuilder() {
             public void configure() {
-                from("olingo2://read/Manufacturers('1')?filterAlreadySeen=true&"
-                    + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=false&"
-                    + "consumer.splitResult=true")
+                from("olingo2://read/Manufacturers('1')?filterAlreadySeen=true&" + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=false&" + "consumer.splitResult=true")
                     .to("mock:consumer-splitresult-kp-manufacturer");
             };
         };
@@ -262,15 +246,15 @@ public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
         // Only polled message contains the entity
         //
         assertTrue(body instanceof ODataEntry);
-        ODataEntry entry = (ODataEntry) body;
+        ODataEntry entry = (ODataEntry)body;
         Object nameValue = entry.getProperties().get("Name");
         assertNotNull(nameValue);
         assertEquals("Star Powered Racing", nameValue.toString());
     }
 
     /**
-     * Read value of the People object and split the results
-     * into individual messages
+     * Read value of the People object and split the results into individual
+     * messages
      */
     @SuppressWarnings("unchecked")
     @Test
@@ -281,8 +265,7 @@ public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
 
         RouteBuilder builder = new RouteBuilder() {
             public void configure() {
-                from("olingo2://read/Manufacturers('1')/Address?consumer.splitResult=true")
-                    .to("mock:consumer-value");
+                from("olingo2://read/Manufacturers('1')/Address?consumer.splitResult=true").to("mock:consumer-value");
             };
         };
         addRouteAndStartContext(builder);
@@ -293,10 +276,10 @@ public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
         //
         Object body = mockEndpoint.getExchanges().get(0).getIn().getBody();
         assertIsInstanceOf(Map.class, body);
-        Map<String, Object> value = (Map<String, Object>) 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;
+        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"));
@@ -304,8 +287,8 @@ public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
     }
 
     /**
-     * Read entity set of the Manufacturers object and split the results
-     * into individual messages
+     * Read entity set of the Manufacturers object and split the results into
+     * individual messages
      */
     @Test
     public void testConsumerReadSplitResults() throws Exception {
@@ -315,8 +298,7 @@ public class Olingo2ComponentConsumerTest extends AbstractOlingo2TestSupport {
 
         RouteBuilder builder = new RouteBuilder() {
             public void configure() {
-                from("olingo2://read/Manufacturers?consumer.splitResult=true")
-                    .to("mock:consumer-splitresult");
+                from("olingo2://read/Manufacturers?consumer.splitResult=true").to("mock:consumer-splitresult");
             };
         };
 
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentProducerTest.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentProducerTest.java
index c541359..cd0483c 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentProducerTest.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentProducerTest.java
@@ -44,7 +44,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Test class for {@link org.apache.camel.component.olingo2.api.Olingo2App} APIs.
+ * 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.
@@ -248,7 +249,7 @@ public class Olingo2ComponentProducerTest extends AbstractOlingo2TestSupport {
     /**
      * Read entity set of the People object and with no filter already seen, all
      * items should be present in each message
-    *
+     *
      * @throws Exception
      */
     @Test
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2RouteTest.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2RouteTest.java
index 8d488b0..f3e7e21 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2RouteTest.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2RouteTest.java
@@ -34,7 +34,7 @@ public class Olingo2RouteTest extends CamelTestSupport {
     private static final int PORT = AvailablePortFinder.getNextAvailable();
     private static final String TEST_SERVICE_URL = "http://localhost:" + PORT + "/MyFormula.svc";
     private static final String ID_PROPERTY = "Id";
-    
+
     private static Olingo2App olingoApp;
     private static Olingo2SampleServer server;
 
@@ -54,29 +54,28 @@ public class Olingo2RouteTest extends CamelTestSupport {
             server.destroy();
         }
     }
-    
+
     protected static void startServers(int port) throws Exception {
         server = new Olingo2SampleServer(port, "/olingo2_ref");
         server.start();
     }
 
     @SuppressWarnings("unchecked")
-    protected <T> T requestBodyAndHeaders(String endpointUri, Object body, Map<String, Object> headers)
-        throws CamelExecutionException {
-        return (T) template().requestBodyAndHeaders(endpointUri, body, headers);
+    protected <T> T requestBodyAndHeaders(String endpointUri, Object body, Map<String, Object> headers) throws CamelExecutionException {
+        return (T)template().requestBodyAndHeaders(endpointUri, body, headers);
     }
-    
+
     @Test
     public void testRead() throws Exception {
         final Map<String, Object> headers = new HashMap<>();
-        
+
         headers.put(Olingo2Constants.PROPERTY_PREFIX + "keyPredicate", "'1'");
         final ODataEntry manufacturer = requestBodyAndHeaders("direct:READENTRY", null, headers);
         assertNotNull(manufacturer);
         final Map<String, Object> properties = manufacturer.getProperties();
         assertEquals("Manufacturer Id", "1", properties.get(ID_PROPERTY));
     }
-    
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2SampleServer.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2SampleServer.java
index ca0057e..5f3935c 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2SampleServer.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2SampleServer.java
@@ -37,7 +37,6 @@ public class Olingo2SampleServer {
     private int port;
 
     /**
-     * 
      * @param port
      * @param resourcePath
      */
@@ -76,8 +75,9 @@ public class Olingo2SampleServer {
 
     static void generateSampleData(String serviceUrl) throws IOException {
         try {
-            // need to use reflection to avoid a build error even when the sample source is not available 
-            Class<?> clz = Class.forName("org.apache.olingo.sample.annotation.util.AnnotationSampleDataGenerator"); 
+            // need to use reflection to avoid a build error even when the
+            // sample source is not available
+            Class<?> clz = Class.forName("org.apache.olingo.sample.annotation.util.AnnotationSampleDataGenerator");
             Method m = clz.getMethod("generateData", String.class);
             m.invoke(null, serviceUrl);
         } catch (Throwable t) {
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/resources/org/apache/camel/component/olingo2/etag-enabled-service.xml b/components/camel-olingo2/camel-olingo2-component/src/test/resources/org/apache/camel/component/olingo2/etag-enabled-service.xml
index 65e6369..c0a8d52 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/resources/org/apache/camel/component/olingo2/etag-enabled-service.xml
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/resources/org/apache/camel/component/olingo2/etag-enabled-service.xml
@@ -1,3 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
 <edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" Version="1.0">
     <script/>
     <edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="1.0">


[camel] 01/03: CAMEL-13598: Implement ETag support in olingo components

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

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

commit fe821aee1ea761ad5841b081958efe7ccadf39a4
Author: phantomjinx <p....@phantomjinx.co.uk>
AuthorDate: Fri Aug 16 15:56:02 2019 +0100

    CAMEL-13598: Implement ETag support in olingo components
    
    * Supports odata services that implement concurrency properties on entities
      by ensuring that when performing patch, update & delete operations, the
      OlingoApp first reads the requisite entity and retrieves its ETag. This
      is then added into the subsequent request under the If-Match header
    
    * Adds additional tests for specifically testing the ETag functionality.
---
 .../component/olingo2/api/impl/Olingo2AppImpl.java | 119 +++++++++-
 .../camel-olingo2/camel-olingo2-component/pom.xml  |  11 +
 .../olingo2/AbstractOlingo2AppAPITestSupport.java  | 192 ++++++++++++++++
 .../olingo2/Olingo2AppAPIETagEnabledTest.java      | 243 +++++++++++++++++++++
 .../camel/component/olingo2/Olingo2AppAPITest.java | 175 +--------------
 .../component/olingo2/etag-enabled-service.xml     |  26 +++
 .../component/olingo4/api/impl/Olingo4AppImpl.java | 126 ++++++++++-
 .../camel/component/olingo4/Olingo4AppAPITest.java | 137 +++++++++++-
 .../olingo4/Olingo4ComponentProducerTest.java      |   6 +-
 9 files changed, 842 insertions(+), 193 deletions(-)

diff --git a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java
index 19bc581..e5fae97 100644
--- a/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java
+++ b/components/camel-olingo2/camel-olingo2-api/src/main/java/org/apache/camel/component/olingo2/api/impl/Olingo2AppImpl.java
@@ -34,8 +34,9 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Optional;
 import java.util.UUID;
-
+import java.util.function.Consumer;
 import org.apache.camel.component.olingo2.api.Olingo2App;
 import org.apache.camel.component.olingo2.api.Olingo2ResponseHandler;
 import org.apache.camel.component.olingo2.api.batch.Olingo2BatchChangeRequest;
@@ -57,6 +58,7 @@ import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpPatch;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.client.methods.HttpPut;
+import org.apache.http.client.methods.HttpRequestBase;
 import org.apache.http.client.methods.HttpUriRequest;
 import org.apache.http.concurrent.FutureCallback;
 import org.apache.http.entity.ContentType;
@@ -88,6 +90,8 @@ import org.apache.olingo.odata2.api.ep.EntityProvider;
 import org.apache.olingo.odata2.api.ep.EntityProviderException;
 import org.apache.olingo.odata2.api.ep.EntityProviderReadProperties;
 import org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties;
+import org.apache.olingo.odata2.api.ep.entry.EntryMetadata;
+import org.apache.olingo.odata2.api.ep.entry.ODataEntry;
 import org.apache.olingo.odata2.api.exception.ODataApplicationException;
 import org.apache.olingo.odata2.api.exception.ODataException;
 import org.apache.olingo.odata2.api.processor.ODataResponse;
@@ -320,7 +324,10 @@ public final class Olingo2AppImpl implements Olingo2App {
                            final Olingo2ResponseHandler<T> responseHandler) {
         final UriInfoWithType uriInfo = parseUri(edm, resourcePath, null);
 
-        writeContent(edm, new HttpPut(createUri(resourcePath, null)), uriInfo, endpointHttpHeaders, data, responseHandler);
+        augmentWithETag(edm, resourcePath, endpointHttpHeaders,
+                        new HttpPut(createUri(resourcePath, null)),
+                        request -> writeContent(edm, (HttpPut) request, uriInfo, endpointHttpHeaders, data, responseHandler),
+                        responseHandler);
     }
 
     @Override
@@ -331,7 +338,10 @@ public final class Olingo2AppImpl implements Olingo2App {
                           final Olingo2ResponseHandler<T> responseHandler) {
         final UriInfoWithType uriInfo = parseUri(edm, resourcePath, null);
 
-        writeContent(edm, new HttpPatch(createUri(resourcePath, null)), uriInfo, endpointHttpHeaders, data, responseHandler);
+        augmentWithETag(edm, resourcePath, endpointHttpHeaders,
+                        new HttpPatch(createUri(resourcePath, null)),
+                        request -> writeContent(edm, (HttpPatch) request, uriInfo, endpointHttpHeaders, data, responseHandler),
+                        responseHandler);
     }
 
     @Override
@@ -342,7 +352,10 @@ public final class Olingo2AppImpl implements Olingo2App {
                           final Olingo2ResponseHandler<T> responseHandler) {
         final UriInfoWithType uriInfo = parseUri(edm, resourcePath, null);
 
-        writeContent(edm, new HttpMerge(createUri(resourcePath, null)), uriInfo, endpointHttpHeaders, data, responseHandler);
+        augmentWithETag(edm, resourcePath, endpointHttpHeaders,
+                        new HttpMerge(createUri(resourcePath, null)),
+                        request -> writeContent(edm, (HttpMerge) request, uriInfo, endpointHttpHeaders, data, responseHandler),
+                        responseHandler);
     }
 
     @Override
@@ -359,9 +372,11 @@ public final class Olingo2AppImpl implements Olingo2App {
     public void delete(final String resourcePath, 
                        final Map<String, String> endpointHttpHeaders, 
                        final Olingo2ResponseHandler<HttpStatusCodes> responseHandler) {
+        HttpDelete deleteRequest = new HttpDelete(createUri(resourcePath));
 
-        execute(new HttpDelete(createUri(resourcePath)), contentType,
-            endpointHttpHeaders, new AbstractFutureCallback<HttpStatusCodes>(responseHandler) {
+        Consumer<HttpRequestBase> deleteFunction = (request) -> {
+            execute(request, contentType,
+                    endpointHttpHeaders, new AbstractFutureCallback<HttpStatusCodes>(responseHandler) {
                 @Override
                 public void onCompleted(HttpResponse result) {
                     final StatusLine statusLine = result.getStatusLine();
@@ -369,6 +384,98 @@ public final class Olingo2AppImpl implements Olingo2App {
                         headersToMap(result.getAllHeaders()));
                 }
             });
+        };
+
+        augmentWithETag(null, resourcePath, endpointHttpHeaders,
+                        deleteRequest,
+                        deleteFunction,
+                        responseHandler);
+    }
+
+    /**
+     * On occasion, some resources are protected with Optimistic Concurrency via the use of eTags.
+     * This will first conduct a read on the given entity resource, find its eTag then perform the given
+     * delegate request function, augmenting the request with the eTag, if appropriate.
+     *
+     * Since read operations may be asynchronous, it is necessary to chain together the methods via
+     * the use of a {@link Consumer} function. Only when the response from the read returns will
+     * this delegate function be executed.
+     *
+     * @param edm the Edm object to be interrogated
+     * @param resourcePath the resource path of the entity to be operated on
+     * @param endpointHttpHeaders the headers provided from the endpoint which may be required for the read operation
+     * @param httpRequest the request to be updated, if appropriate, with the eTag and provided to the delegate request function
+     * @param delegateRequestFn the function to be invoked in response to the read operation
+     * @param delegateResponseHandler the response handler to respond if any errors occur during the read operation
+     */
+    private <T> void augmentWithETag(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders,
+                                     final HttpRequestBase httpRequest,
+                                     final Consumer<HttpRequestBase> delegateRequestFn,
+                                     final Olingo2ResponseHandler<T> delegateResponseHandler) {
+
+        if (edm == null) {
+            // Can be the case if calling a delete then need to do a metadata call first
+            final Olingo2ResponseHandler<Edm> edmResponseHandler = new Olingo2ResponseHandler<Edm>() {
+                @Override
+                public void onResponse(Edm response, Map<String, String> responseHeaders) {
+                    //
+                    // Call this method again with an intact edm object
+                    //
+                    augmentWithETag(response, resourcePath, endpointHttpHeaders, httpRequest, delegateRequestFn, delegateResponseHandler);
+                }
+
+                @Override
+                public void onException(Exception ex) {
+                    delegateResponseHandler.onException(ex);
+                }
+
+                @Override
+                public void onCanceled() {
+                    delegateResponseHandler.onCanceled();
+                }
+            };
+
+            //
+            // Reads the metadata to establish an Edm object
+            // then the response handler invokes this method again with the new edm object
+            //
+            read(null, "$metadata", null, null, edmResponseHandler);
+
+        } else {
+
+            //
+            // The handler that responds to the read operation and supplies an ETag if necessary
+            // and invokes the delegate request function
+            //
+            Olingo2ResponseHandler<T> eTagReadHandler = new Olingo2ResponseHandler<T>() {
+
+                @Override
+                public void onResponse(T response, Map<String, String> responseHeaders) {
+                    if (response instanceof ODataEntry) {
+                        ODataEntry e = (ODataEntry) response;
+                        Optional
+                           .ofNullable(e.getMetadata())
+                           .map(EntryMetadata::getEtag)
+                           .ifPresent(v -> httpRequest.addHeader("If-Match", v));
+                    }
+
+                    // Invoke the delegate request function providing the modified request
+                    delegateRequestFn.accept(httpRequest);
+                }
+
+                @Override
+                public void onException(Exception ex) {
+                    delegateResponseHandler.onException(ex);
+                }
+
+                @Override
+                public void onCanceled() {
+                    delegateResponseHandler.onCanceled();
+                }
+            };
+
+            read(edm, resourcePath, null, endpointHttpHeaders, eTagReadHandler);
+        }
     }
 
     private <T> void readContent(UriInfoWithType uriInfo, Map<String, String> responseHeaders, InputStream content, Olingo2ResponseHandler<T> responseHandler) {
diff --git a/components/camel-olingo2/camel-olingo2-component/pom.xml b/components/camel-olingo2/camel-olingo2-component/pom.xml
index 6746f68..b007e07 100644
--- a/components/camel-olingo2/camel-olingo2-component/pom.xml
+++ b/components/camel-olingo2/camel-olingo2-component/pom.xml
@@ -121,6 +121,17 @@
             <artifactId>cxf-rt-frontend-jaxrs</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>mockwebserver</artifactId>
+            <version>${okclient-version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <scope>test</scope>
+        </dependency>
 
         <dependency>
             <groupId>org.eclipse.jetty</groupId>
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/AbstractOlingo2AppAPITestSupport.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/AbstractOlingo2AppAPITestSupport.java
new file mode 100644
index 0000000..dc3ae9f
--- /dev/null
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/AbstractOlingo2AppAPITestSupport.java
@@ -0,0 +1,192 @@
+/*
+ * Copyright (C) 2016 Red Hat, Inc.
+ *
+ * Licensed 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 static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import java.text.DateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import org.apache.camel.component.olingo2.api.Olingo2ResponseHandler;
+import org.apache.camel.test.AvailablePortFinder;
+import org.apache.http.entity.ContentType;
+import org.apache.olingo.odata2.api.ep.entry.ODataEntry;
+import org.apache.olingo.odata2.api.ep.feed.ODataDeltaFeed;
+import org.apache.olingo.odata2.api.ep.feed.ODataFeed;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AbstractOlingo2AppAPITestSupport {
+
+    protected static final String SERVICE_NAME = "MyFormula.svc";
+    protected static final Logger LOG = LoggerFactory.getLogger(Olingo2AppAPITest.class);
+    protected static final int PORT = AvailablePortFinder.getNextAvailable();
+    protected static final long TIMEOUT = 100000;
+    protected static final String MANUFACTURERS = "Manufacturers";
+    protected static final String FQN_MANUFACTURERS = "DefaultContainer.Manufacturers";
+    protected static final String ADDRESS = "Address";
+    protected static final String CARS = "Cars";
+    protected static final String TEST_KEY = "'1'";
+    protected static final String TEST_CREATE_KEY = "'123'";
+    protected static final String TEST_MANUFACTURER = FQN_MANUFACTURERS + "(" + TEST_KEY + ")";
+    protected static final String TEST_CREATE_MANUFACTURER = MANUFACTURERS + "(" + TEST_CREATE_KEY + ")";
+    protected static final String TEST_RESOURCE_CONTENT_ID = "1";
+    protected static final String TEST_RESOURCE = "$" + TEST_RESOURCE_CONTENT_ID;
+    protected static final char NEW_LINE = '\n';
+    protected static final String TEST_CAR = "Manufacturers('1')/Cars('1')";
+    protected static final String TEST_MANUFACTURER_FOUNDED_PROPERTY = "Manufacturers('1')/Founded";
+    protected static final String TEST_MANUFACTURER_FOUNDED_VALUE = "Manufacturers('1')/Founded/$value";
+    protected static final String FOUNDED_PROPERTY = "Founded";
+    protected static final String TEST_MANUFACTURER_ADDRESS_PROPERTY = "Manufacturers('1')/Address";
+    protected static final String TEST_MANUFACTURER_LINKS_CARS = "Manufacturers('1')/$links/Cars";
+    protected static final String TEST_CAR_LINK_MANUFACTURER = "Cars('1')/$links/Manufacturer";
+    protected static final String COUNT_OPTION = "/$count";
+    protected static final String TEST_SERVICE_URL = "http://localhost:" + PORT + "/" + SERVICE_NAME;
+    protected static final ContentType TEST_FORMAT = ContentType.APPLICATION_JSON;
+    protected static final String TEST_FORMAT_STRING = TEST_FORMAT.toString();
+    protected static final String ID_PROPERTY = "Id";
+
+    protected static Map<String, Object> getEntityData() {
+        Map<String, Object> data = new HashMap<>();
+        data.put(ID_PROPERTY, "123");
+        data.put("Name", "MyCarManufacturer");
+        data.put(FOUNDED_PROPERTY, new Date());
+        Map<String, Object> address = new HashMap<>();
+        address.put("Street", "Main");
+        address.put("ZipCode", "42421");
+        address.put("City", "Fairy City");
+        address.put("Country", "FarFarAway");
+        data.put(ADDRESS, address);
+        return data;
+    }
+
+    protected static void indent(StringBuilder builder, int indentLevel) {
+        for (int i = 0; i < indentLevel; i++) {
+            builder.append("  ");
+        }
+    }
+
+    protected static String prettyPrint(ODataFeed dataFeed) {
+        StringBuilder builder = new StringBuilder();
+        builder.append("[\n");
+        for (ODataEntry entry : dataFeed.getEntries()) {
+            builder.append(prettyPrint(entry.getProperties(), 1)).append('\n');
+        }
+        builder.append("]\n");
+        return builder.toString();
+    }
+
+    protected static String prettyPrint(ODataEntry createdEntry) {
+        return prettyPrint(createdEntry.getProperties(), 0);
+    }
+
+    protected static String prettyPrint(Map<String, Object> properties, int level) {
+        StringBuilder b = new StringBuilder();
+        Set<Map.Entry<String, Object>> entries = properties.entrySet();
+
+        for (Map.Entry<String, Object> entry : entries) {
+            indent(b, level);
+            b.append(entry.getKey()).append(": ");
+            Object value = entry.getValue();
+            if (value instanceof Map) {
+                @SuppressWarnings("unchecked")
+                final Map<String, Object> objectMap = (Map<String, Object>) value;
+                value = prettyPrint(objectMap, level + 1);
+                b.append(value).append(NEW_LINE);
+            } else if (value instanceof Calendar) {
+                Calendar cal = (Calendar) value;
+                value = DateFormat.getInstance().format(cal.getTime());
+                b.append(value).append(NEW_LINE);
+            } else if (value instanceof ODataDeltaFeed) {
+                ODataDeltaFeed feed = (ODataDeltaFeed) value;
+                List<ODataEntry> inlineEntries = feed.getEntries();
+                b.append("{");
+                for (ODataEntry oDataEntry : inlineEntries) {
+                    value = prettyPrint(oDataEntry.getProperties(), level + 1);
+                    b.append("\n[\n").append(value).append("\n],");
+                }
+                b.deleteCharAt(b.length() - 1);
+                indent(b, level);
+                b.append("}\n");
+            } else {
+                b.append(value).append(NEW_LINE);
+            }
+        }
+        // remove last line break
+        b.deleteCharAt(b.length() - 1);
+        return b.toString();
+    }
+
+    protected static final class TestOlingo2ResponseHandler<T> implements Olingo2ResponseHandler<T> {
+
+        private T response;
+        private Exception error;
+        private CountDownLatch latch = new CountDownLatch(1);
+
+        @Override
+        public void onResponse(T response, Map<String, String> responseHeaders) {
+            this.response = response;
+            if (LOG.isDebugEnabled()) {
+                if (response instanceof ODataFeed) {
+                    LOG.debug("Received response: {}", prettyPrint((ODataFeed) response));
+                } else if (response instanceof ODataEntry) {
+                    LOG.debug("Received response: {}", prettyPrint((ODataEntry) response));
+                } else {
+                    LOG.debug("Received response: {}", response);
+                }
+            }
+            latch.countDown();
+        }
+
+        @Override
+        public void onException(Exception ex) {
+            error = ex;
+            latch.countDown();
+        }
+
+        @Override
+        public void onCanceled() {
+            error = new IllegalStateException("Request Canceled");
+            latch.countDown();
+        }
+
+        public T await() throws Exception {
+            return await(TIMEOUT, TimeUnit.SECONDS);
+        }
+
+        public T await(long timeout, TimeUnit unit) throws Exception {
+            assertTrue("Timeout waiting for response", latch.await(timeout, unit));
+            if (error != null) {
+                throw error;
+            }
+            assertNotNull("Response", response);
+            return response;
+        }
+
+        public void reset() {
+            latch.countDown();
+            latch = new CountDownLatch(1);
+            response = null;
+            error = null;
+        }
+    }
+}
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPIETagEnabledTest.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPIETagEnabledTest.java
new file mode 100644
index 0000000..9eb274a
--- /dev/null
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPIETagEnabledTest.java
@@ -0,0 +1,243 @@
+/*
+ * Copyright (C) 2016 Red Hat, Inc.
+ *
+ * Licensed 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 static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+import java.io.InputStream;
+import java.util.Map;
+import javax.ws.rs.HttpMethod;
+import org.apache.camel.component.olingo2.api.Olingo2App;
+import org.apache.camel.component.olingo2.api.impl.Olingo2AppImpl;
+import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
+import org.apache.olingo.odata2.api.commons.ODataHttpHeaders;
+import org.apache.olingo.odata2.api.edm.Edm;
+import org.apache.olingo.odata2.api.edm.EdmEntityContainer;
+import org.apache.olingo.odata2.api.edm.EdmEntitySet;
+import org.apache.olingo.odata2.api.edm.EdmEntityType;
+import org.apache.olingo.odata2.api.edm.EdmProperty;
+import org.apache.olingo.odata2.api.edm.EdmServiceMetadata;
+import org.apache.olingo.odata2.api.ep.EntityProvider;
+import org.apache.olingo.odata2.api.ep.EntityProviderWriteProperties;
+import org.apache.olingo.odata2.api.processor.ODataResponse;
+import org.eclipse.jetty.http.HttpHeader;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import okhttp3.HttpUrl;
+import okhttp3.mockwebserver.Dispatcher;
+import okhttp3.mockwebserver.MockResponse;
+import okhttp3.mockwebserver.MockWebServer;
+import okhttp3.mockwebserver.RecordedRequest;
+import okio.Buffer;
+
+/**
+ * Tests support for concurrency properties which generate and require
+ * reading eTags before patch, update and delete operations.
+ *
+ * Since the embedded olingo2 odata service does not contain any
+ * concurrency properties, it is necessary to mock up a new server.
+ *
+ * Uses a cutdown version of the reference odata service and adds in
+ * extra concurrency properties.
+ *
+ * Service's dispatcher only tests the correct calls are made and whether
+ * the eTags are correctly added as headers to the requisite requests.
+ *
+ */
+public class Olingo2AppAPIETagEnabledTest extends AbstractOlingo2AppAPITestSupport {
+
+    private static MockWebServer server;
+    private static Olingo2App olingoApp;
+    private static Edm edm;
+    private static EdmEntitySet manufacturersSet;
+
+    @BeforeClass
+    public static void scaffold() throws Exception {
+        initEdm();
+        initServer();
+    }
+
+    @AfterClass
+    public static void unscaffold() throws Exception {
+        if (olingoApp != null) {
+            olingoApp.close();
+        }
+        if (server != null) {
+            server.shutdown();
+        }
+    }
+
+    private static void initEdm() throws Exception {
+        InputStream edmXml = Olingo2AppAPIETagEnabledTest.class.getResourceAsStream("etag-enabled-service.xml");
+        edm = EntityProvider.readMetadata(edmXml, true);
+        assertNotNull(edm);
+
+        EdmEntityContainer entityContainer = edm.getDefaultEntityContainer();
+        assertNotNull(entityContainer);
+        manufacturersSet = entityContainer.getEntitySet(MANUFACTURERS);
+        assertNotNull(manufacturersSet);
+
+        EdmEntityType entityType = manufacturersSet.getEntityType();
+        assertNotNull(entityType);
+
+        //
+        // Check we have enabled eTag properties
+        //
+        EdmProperty property = (EdmProperty) entityType.getProperty("Id");
+        assertNotNull(property.getFacets());
+    }
+
+    private static void initServer() throws Exception {
+        server = new MockWebServer();
+        //
+        // Init dispatcher prior to start of server
+        //
+        server.setDispatcher(new Dispatcher() {
+
+            @SuppressWarnings( "resource" )
+            @Override
+            public MockResponse dispatch(RecordedRequest recordedRequest) throws InterruptedException {
+                MockResponse mockResponse = new MockResponse();
+
+                switch(recordedRequest.getMethod()) {
+                    case HttpMethod.GET:
+                        try {
+                            if (recordedRequest.getPath().endsWith("/" + TEST_CREATE_MANUFACTURER)) {
+
+                                ODataResponse odataResponse = EntityProvider.writeEntry(TEST_FORMAT.getMimeType(),
+                                                                                        manufacturersSet, getEntityData(),
+                                                                                        EntityProviderWriteProperties
+                                                                                            .serviceRoot(getServiceUrl().uri())
+                                                                                            .build());
+                                InputStream entityStream = odataResponse.getEntityAsStream();
+                                mockResponse.setResponseCode(HttpStatusCodes.OK.getStatusCode());
+                                mockResponse.setBody(new Buffer().readFrom(entityStream));
+                                return mockResponse;
+
+                        } else if (recordedRequest.getPath().endsWith("/" + Olingo2AppImpl.METADATA)) {
+
+                            EdmServiceMetadata serviceMetadata = edm.getServiceMetadata();
+                            return mockResponse
+                                .setResponseCode(HttpStatusCodes.OK.getStatusCode())
+                                .addHeader(ODataHttpHeaders.DATASERVICEVERSION, serviceMetadata.getDataServiceVersion())
+                                .setBody(new Buffer().readFrom(serviceMetadata.getMetadata()));
+                        }
+
+                        } catch (Exception ex) {
+                            throw new RuntimeException(ex);
+                        }
+                        break;
+                    case HttpMethod.PATCH:
+                    case HttpMethod.PUT:
+                    case HttpMethod.POST:
+                    case HttpMethod.DELETE:
+                        //
+                        // Objective of the test:
+                        //   The Read has to have been called by Olingo2AppImpl.argumentWithETag
+                        //    which should then populate the IF-MATCH header with the eTag value.
+                        //    Verify the eTag value is present.
+                        //
+                        assertNotNull(recordedRequest.getHeader(HttpHeader.IF_MATCH.asString()));
+
+                        return mockResponse.setResponseCode(HttpStatusCodes.NO_CONTENT.getStatusCode());
+                }
+
+                mockResponse
+                    .setResponseCode(HttpStatusCodes.NOT_FOUND.getStatusCode())
+                    .setBody("{ status: \"Not Found\"}");
+                return mockResponse;
+            }
+        });
+        server.start();
+
+        //
+        // have to init olingoApp after start of server
+        // since getBaseUrl() will call server start
+        //
+        olingoApp = new Olingo2AppImpl(getServiceUrl() + "/");
+        olingoApp.setContentType(TEST_FORMAT_STRING);
+    }
+
+    private static HttpUrl getServiceUrl() {
+        if (server == null) {
+            fail("Test programming failure. Server not initialised");
+        }
+
+        return server.url(SERVICE_NAME);
+    }
+
+    @Test
+    public void testPatchEntityWithETag() throws Exception {
+        TestOlingo2ResponseHandler<HttpStatusCodes> statusHandler = new TestOlingo2ResponseHandler<>();
+
+        Map<String, Object> data = getEntityData();
+        @SuppressWarnings("unchecked")
+        Map<String, Object> address = (Map<String, Object>) data.get(ADDRESS);
+
+        data.put("Name", "MyCarManufacturer Renamed");
+        address.put("Street", "Main Street");
+
+        //
+        // Call patch
+        //
+        olingoApp.patch(edm, TEST_CREATE_MANUFACTURER, null, data, statusHandler);
+
+        HttpStatusCodes statusCode = statusHandler.await();
+        assertEquals(HttpStatusCodes.NO_CONTENT, statusCode);
+    }
+
+    @Test
+    public void testUpdateEntityWithETag() throws Exception {
+        TestOlingo2ResponseHandler<HttpStatusCodes> statusHandler = new TestOlingo2ResponseHandler<>();
+
+        Map<String, Object> data = getEntityData();
+        @SuppressWarnings("unchecked")
+        Map<String, Object> address = (Map<String, Object>) data.get(ADDRESS);
+
+        data.put("Name", "MyCarManufacturer Renamed");
+        address.put("Street", "Main Street");
+
+        //
+        // Call update
+        //
+        olingoApp.update(edm, TEST_CREATE_MANUFACTURER, null, data, statusHandler);
+
+        HttpStatusCodes statusCode = statusHandler.await();
+        assertEquals(HttpStatusCodes.NO_CONTENT, statusCode);
+    }
+
+    @Test
+    public void testDeleteEntityWithETag() throws Exception {
+        TestOlingo2ResponseHandler<HttpStatusCodes> statusHandler = new TestOlingo2ResponseHandler<>();
+
+        Map<String, Object> data = getEntityData();
+        @SuppressWarnings("unchecked")
+        Map<String, Object> address = (Map<String, Object>) data.get(ADDRESS);
+
+        data.put("Name", "MyCarManufacturer Renamed");
+        address.put("Street", "Main Street");
+
+        //
+        // Call delete
+        //
+        olingoApp.delete(TEST_CREATE_MANUFACTURER, null, statusHandler);
+
+        HttpStatusCodes statusCode = statusHandler.await();
+        assertEquals(HttpStatusCodes.NO_CONTENT, statusCode);
+    }
+}
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPITest.java b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPITest.java
index edb204a..1c1f281 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPITest.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2AppAPITest.java
@@ -16,19 +16,14 @@
  */
 package org.apache.camel.component.olingo2;
 import java.io.InputStream;
-import java.text.DateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
-
 import org.apache.camel.component.olingo2.api.Olingo2App;
-import org.apache.camel.component.olingo2.api.Olingo2ResponseHandler;
 import org.apache.camel.component.olingo2.api.batch.Olingo2BatchChangeRequest;
 import org.apache.camel.component.olingo2.api.batch.Olingo2BatchQueryRequest;
 import org.apache.camel.component.olingo2.api.batch.Olingo2BatchRequest;
@@ -36,8 +31,6 @@ import org.apache.camel.component.olingo2.api.batch.Olingo2BatchResponse;
 import org.apache.camel.component.olingo2.api.batch.Operation;
 import org.apache.camel.component.olingo2.api.impl.Olingo2AppImpl;
 import org.apache.camel.component.olingo2.api.impl.SystemQueryOption;
-import org.apache.camel.test.AvailablePortFinder;
-import org.apache.http.entity.ContentType;
 import org.apache.olingo.odata2.api.commons.HttpStatusCodes;
 import org.apache.olingo.odata2.api.edm.Edm;
 import org.apache.olingo.odata2.api.edm.EdmEntitySet;
@@ -45,63 +38,22 @@ import org.apache.olingo.odata2.api.edm.EdmEntitySetInfo;
 import org.apache.olingo.odata2.api.ep.EntityProvider;
 import org.apache.olingo.odata2.api.ep.EntityProviderReadProperties;
 import org.apache.olingo.odata2.api.ep.entry.ODataEntry;
-import org.apache.olingo.odata2.api.ep.feed.ODataDeltaFeed;
 import org.apache.olingo.odata2.api.ep.feed.ODataFeed;
 import org.apache.olingo.odata2.api.servicedocument.Collection;
 import org.apache.olingo.odata2.api.servicedocument.ServiceDocument;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 /**
  * Integration test for {@link org.apache.camel.component.olingo2.api.impl.Olingo2AppImpl}
  * using the sample Olingo2 Server dynamically downloaded and started during the test.
  */
-public class Olingo2AppAPITest {
-
-    private static final Logger LOG = LoggerFactory.getLogger(Olingo2AppAPITest.class);
-    private static final int PORT = AvailablePortFinder.getNextAvailable();  
-
-    private static final long TIMEOUT = 10;
-
-    private static final String MANUFACTURERS = "Manufacturers";
-    private static final String FQN_MANUFACTURERS = "DefaultContainer.Manufacturers";
-    private static final String ADDRESS = "Address";
-    private static final String CARS = "Cars";
-
-    private static final String TEST_KEY = "'1'";
-    private static final String TEST_CREATE_KEY = "'123'";
-    private static final String TEST_MANUFACTURER = FQN_MANUFACTURERS + "(" + TEST_KEY + ")";
-    private static final String TEST_CREATE_MANUFACTURER = MANUFACTURERS + "(" + TEST_CREATE_KEY + ")";
-
-    private static final String TEST_RESOURCE_CONTENT_ID = "1";
-    private static final String TEST_RESOURCE = "$" + TEST_RESOURCE_CONTENT_ID;
-
-    private static final char NEW_LINE = '\n';
-    private static final String TEST_CAR = "Manufacturers('1')/Cars('1')";
-    private static final String TEST_MANUFACTURER_FOUNDED_PROPERTY = "Manufacturers('1')/Founded";
-    private static final String TEST_MANUFACTURER_FOUNDED_VALUE = "Manufacturers('1')/Founded/$value";
-    private static final String FOUNDED_PROPERTY = "Founded";
-    private static final String TEST_MANUFACTURER_ADDRESS_PROPERTY = "Manufacturers('1')/Address";
-    private static final String TEST_MANUFACTURER_LINKS_CARS = "Manufacturers('1')/$links/Cars";
-    private static final String TEST_CAR_LINK_MANUFACTURER = "Cars('1')/$links/Manufacturer";
-    private static final String COUNT_OPTION = "/$count";
-
-    private static final String TEST_SERVICE_URL = "http://localhost:" + PORT + "/MyFormula.svc";
-    //    private static final String TEST_SERVICE_URL = "http://localhost:8080/cars-annotations-sample/MyFormula.svc";
-//    private static final ContentType TEST_FORMAT = ContentType.APPLICATION_XML_CS_UTF_8;
-    private static final ContentType TEST_FORMAT = ContentType.APPLICATION_JSON;
-    private static final String TEST_FORMAT_STRING = TEST_FORMAT.toString();
-//    private static final Pattern LINK_PATTERN = Pattern.compile("[^(]+\\('([^']+)'\\)");
-    private static final String ID_PROPERTY = "Id";
+public class Olingo2AppAPITest extends AbstractOlingo2AppAPITestSupport {
 
     private static Olingo2App olingoApp;
     private static Edm edm;
@@ -523,129 +475,4 @@ public class Olingo2AppAPITest {
         assertNotNull(exception);
         LOG.info("Batch retrieve deleted entry:  {}", exception);
     }
-
-    private Map<String, Object> getEntityData() {
-        Map<String, Object> data = new HashMap<>();
-        data.put(ID_PROPERTY, "123");
-        data.put("Name", "MyCarManufacturer");
-        data.put(FOUNDED_PROPERTY, new Date());
-        Map<String, Object> address = new HashMap<>();
-        address.put("Street", "Main");
-        address.put("ZipCode", "42421");
-        address.put("City", "Fairy City");
-        address.put("Country", "FarFarAway");
-        data.put(ADDRESS, address);
-        return data;
-    }
-
-    private static String prettyPrint(ODataFeed dataFeed) {
-        StringBuilder builder = new StringBuilder();
-        builder.append("[\n");
-        for (ODataEntry entry : dataFeed.getEntries()) {
-            builder.append(prettyPrint(entry.getProperties(), 1)).append('\n');
-        }
-        builder.append("]\n");
-        return builder.toString();
-    }
-
-    private static String prettyPrint(ODataEntry createdEntry) {
-        return prettyPrint(createdEntry.getProperties(), 0);
-    }
-
-    private static String prettyPrint(Map<String, Object> properties, int level) {
-        StringBuilder b = new StringBuilder();
-        Set<Map.Entry<String, Object>> entries = properties.entrySet();
-
-        for (Map.Entry<String, Object> entry : entries) {
-            indent(b, level);
-            b.append(entry.getKey()).append(": ");
-            Object value = entry.getValue();
-            if (value instanceof Map) {
-                @SuppressWarnings("unchecked")
-                final Map<String, Object> objectMap = (Map<String, Object>) value;
-                value = prettyPrint(objectMap, level + 1);
-                b.append(value).append(NEW_LINE);
-            } else if (value instanceof Calendar) {
-                Calendar cal = (Calendar) value;
-                value = DateFormat.getInstance().format(cal.getTime());
-                b.append(value).append(NEW_LINE);
-            } else if (value instanceof ODataDeltaFeed) {
-                ODataDeltaFeed feed = (ODataDeltaFeed) value;
-                List<ODataEntry> inlineEntries = feed.getEntries();
-                b.append("{");
-                for (ODataEntry oDataEntry : inlineEntries) {
-                    value = prettyPrint(oDataEntry.getProperties(), level + 1);
-                    b.append("\n[\n").append(value).append("\n],");
-                }
-                b.deleteCharAt(b.length() - 1);
-                indent(b, level);
-                b.append("}\n");
-            } else {
-                b.append(value).append(NEW_LINE);
-            }
-        }
-        // remove last line break
-        b.deleteCharAt(b.length() - 1);
-        return b.toString();
-    }
-
-    private static void indent(StringBuilder builder, int indentLevel) {
-        for (int i = 0; i < indentLevel; i++) {
-            builder.append("  ");
-        }
-    }
-
-    private static final class TestOlingo2ResponseHandler<T> implements Olingo2ResponseHandler<T> {
-
-        private T response;
-        private Exception error;
-        private CountDownLatch latch = new CountDownLatch(1);
-
-        @Override
-        public void onResponse(T response, Map<String, String> responseHeaders) {
-            this.response = response;
-            if (LOG.isDebugEnabled()) {
-                if (response instanceof ODataFeed) {
-                    LOG.debug("Received response: {}", prettyPrint((ODataFeed) response));
-                } else if (response instanceof ODataEntry) {
-                    LOG.debug("Received response: {}", prettyPrint((ODataEntry) response));
-                } else {
-                    LOG.debug("Received response: {}", response);
-                }
-            }
-            latch.countDown();
-        }
-
-        @Override
-        public void onException(Exception ex) {
-            error = ex;
-            latch.countDown();
-        }
-
-        @Override
-        public void onCanceled() {
-            error = new IllegalStateException("Request Canceled");
-            latch.countDown();
-        }
-
-        public T await() throws Exception {
-            return await(TIMEOUT, TimeUnit.SECONDS);
-        }
-
-        public T await(long timeout, TimeUnit unit) throws Exception {
-            assertTrue("Timeout waiting for response", latch.await(timeout, unit));
-            if (error != null) {
-                throw error;
-            }
-            assertNotNull("Response", response);
-            return response;
-        }
-
-        public void reset() {
-            latch.countDown();
-            latch = new CountDownLatch(1);
-            response = null;
-            error = null;
-        }
-    }
 }
diff --git a/components/camel-olingo2/camel-olingo2-component/src/test/resources/org/apache/camel/component/olingo2/etag-enabled-service.xml b/components/camel-olingo2/camel-olingo2-component/src/test/resources/org/apache/camel/component/olingo2/etag-enabled-service.xml
new file mode 100644
index 0000000..65e6369
--- /dev/null
+++ b/components/camel-olingo2/camel-olingo2-component/src/test/resources/org/apache/camel/component/olingo2/etag-enabled-service.xml
@@ -0,0 +1,26 @@
+<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" Version="1.0">
+    <script/>
+    <edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="1.0">
+        <Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="MyFormula">
+            <EntityType Name="Manufacturer">
+                <Key>
+                    <PropertyRef Name="Id"/>
+                </Key>
+                <!-- Includes concurrency support which is then handled using ETags -->
+                <Property Name="Id" Type="Edm.String" Nullable="true" ConcurrencyMode="Fixed"/>
+                <Property Name="Name" Type="Edm.String" Nullable="true" ConcurrencyMode="Fixed"/>
+                <Property Name="Founded" Type="Edm.DateTimeOffset" Nullable="true" ConcurrencyMode="Fixed"/>
+                <Property Name="Address" Type="MyFormula.Address" Nullable="true" ConcurrencyMode="Fixed"/>
+            </EntityType>
+            <ComplexType Name="Address">
+                <Property Name="Street" Type="Edm.String" Nullable="true"/>
+                <Property Name="City" Type="Edm.String" Nullable="true"/>
+                <Property Name="ZipCode" Type="Edm.String" Nullable="true"/>
+                <Property Name="Country" Type="Edm.String" Nullable="true"/>
+            </ComplexType>
+            <EntityContainer Name="DefaultContainer" m:IsDefaultEntityContainer="true">
+                <EntitySet Name="Manufacturers" EntityType="MyFormula.Manufacturer"/>
+            </EntityContainer>
+        </Schema>
+    </edmx:DataServices>
+</edmx:Edmx>
\ No newline at end of file
diff --git a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
index bf0b2ed..87f4ccb 100644
--- a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
+++ b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
@@ -28,7 +28,9 @@ import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 import java.util.UUID;
+import java.util.function.Consumer;
 import org.apache.camel.component.olingo4.api.Olingo4App;
 import org.apache.camel.component.olingo4.api.Olingo4ResponseHandler;
 import org.apache.camel.component.olingo4.api.batch.Olingo4BatchChangeRequest;
@@ -56,6 +58,7 @@ import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpPatch;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.client.methods.HttpPut;
+import org.apache.http.client.methods.HttpRequestBase;
 import org.apache.http.client.methods.HttpUriRequest;
 import org.apache.http.concurrent.FutureCallback;
 import org.apache.http.config.MessageConstraints;
@@ -276,32 +279,50 @@ public final class Olingo4AppImpl implements Olingo4App {
     public <T> void update(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data, final Olingo4ResponseHandler<T> responseHandler) {
         final UriInfo uriInfo = parseUri(edm, resourcePath, null, serviceUri);
 
-        writeContent(edm, new HttpPut(createUri(resourcePath, null)), uriInfo, data, endpointHttpHeaders, responseHandler);
+        augmentWithETag(edm, resourcePath, endpointHttpHeaders,
+                        new HttpPut(createUri(resourcePath, null)),
+                        request -> writeContent(edm, (HttpPut) request, uriInfo, data, endpointHttpHeaders, responseHandler),
+                        responseHandler);
     }
 
     @Override
     public void delete(final String resourcePath, final Map<String, String> endpointHttpHeaders, final Olingo4ResponseHandler<HttpStatusCode> responseHandler) {
-        execute(new HttpDelete(createUri(resourcePath)), contentType, endpointHttpHeaders, new AbstractFutureCallback<HttpStatusCode>(responseHandler) {
-            @Override
-            public void onCompleted(HttpResponse result) {
-                final StatusLine statusLine = result.getStatusLine();
-                responseHandler.onResponse(HttpStatusCode.fromStatusCode(statusLine.getStatusCode()), headersToMap(result.getAllHeaders()));
-            }
-        });
+        HttpDelete deleteRequest = new HttpDelete(createUri(resourcePath));
+
+        Consumer<HttpRequestBase> deleteFunction = (request) -> {
+            execute(request, contentType, endpointHttpHeaders, new AbstractFutureCallback<HttpStatusCode>(responseHandler) {
+                @Override
+                public void onCompleted(HttpResponse result) {
+                    final StatusLine statusLine = result.getStatusLine();
+                    responseHandler.onResponse(HttpStatusCode.fromStatusCode(statusLine.getStatusCode()), headersToMap(result.getAllHeaders()));
+                }
+            });
+        };
+
+        augmentWithETag(null, resourcePath, endpointHttpHeaders,
+                        deleteRequest,
+                        deleteFunction,
+                        responseHandler);
     }
 
     @Override
     public <T> void patch(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data, final Olingo4ResponseHandler<T> responseHandler) {
         final UriInfo uriInfo = parseUri(edm, resourcePath, null, serviceUri);
 
-        writeContent(edm, new HttpPatch(createUri(resourcePath, null)), uriInfo, data, endpointHttpHeaders, responseHandler);
+        augmentWithETag(edm, resourcePath, endpointHttpHeaders,
+                        new HttpPatch(createUri(resourcePath, null)),
+                        request -> writeContent(edm, (HttpPatch) request, uriInfo, data, endpointHttpHeaders, responseHandler),
+                        responseHandler);
     }
 
     @Override
     public <T> void merge(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data, final Olingo4ResponseHandler<T> responseHandler) {
         final UriInfo uriInfo = parseUri(edm, resourcePath, null, serviceUri);
 
-        writeContent(edm, new HttpMerge(createUri(resourcePath, null)), uriInfo, data, endpointHttpHeaders, responseHandler);
+        augmentWithETag(edm, resourcePath, endpointHttpHeaders,
+                        new HttpMerge(createUri(resourcePath, null)),
+                        request -> writeContent(edm, (HttpMerge) request, uriInfo, data, endpointHttpHeaders, responseHandler),
+                        responseHandler);
     }
 
     @Override
@@ -345,6 +366,91 @@ public final class Olingo4AppImpl implements Olingo4App {
         return resourceContentType;
     }
 
+    /**
+     * On occasion, some resources are protected with Optimistic Concurrency via the use of eTags.
+     * This will first conduct a read on the given entity resource, find its eTag then perform the given
+     * delegate request function, augmenting the request with the eTag, if appropriate.
+     *
+     * Since read operations may be asynchronous, it is necessary to chain together the methods via
+     * the use of a {@link Consumer} function. Only when the response from the read returns will
+     * this delegate function be executed.
+     *
+     * @param edm the Edm object to be interrogated
+     * @param resourcePath the resource path of the entity to be operated on
+     * @param endpointHttpHeaders the headers provided from the endpoint which may be required for the read operation
+     * @param httpRequest the request to be updated, if appropriate, with the eTag and provided to the delegate request function
+     * @param delegateRequestFn the function to be invoked in response to the read operation
+     * @param delegateResponseHandler the response handler to respond if any errors occur during the read operation
+     */
+    private <T> void augmentWithETag(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders,
+                                     final HttpRequestBase httpRequest,
+                                     final Consumer<HttpRequestBase> delegateRequestFn,
+                                     final Olingo4ResponseHandler<T> delegateResponseHandler) {
+
+        if (edm == null) {
+            // Can be the case if calling a delete then need to do a metadata call first
+            final Olingo4ResponseHandler<Edm> edmResponseHandler = new Olingo4ResponseHandler<Edm>() {
+                @Override
+                public void onResponse(Edm response, Map<String, String> responseHeaders) {
+                    //
+                    // Call this method again with an intact edm object
+                    //
+                    augmentWithETag(response, resourcePath, endpointHttpHeaders, httpRequest, delegateRequestFn, delegateResponseHandler);
+                }
+
+                @Override
+                public void onException(Exception ex) {
+                    delegateResponseHandler.onException(ex);
+                }
+
+                @Override
+                public void onCanceled() {
+                    delegateResponseHandler.onCanceled();
+                }
+            };
+
+            //
+            // Reads the metadata to establish an Edm object
+            // then the response handler invokes this method again with the new edm object
+            //
+            read(null, Constants.METADATA, null, null, edmResponseHandler);
+
+        } else {
+
+            //
+            // The handler that responds to the read operation and supplies an ETag if necessary
+            // and invokes the delegate request function
+            //
+            Olingo4ResponseHandler<T> eTagReadHandler = new Olingo4ResponseHandler<T>() {
+
+                @Override
+                public void onResponse(T response, Map<String, String> responseHeaders) {
+                    if (response instanceof ClientEntity) {
+                        ClientEntity e = (ClientEntity) response;
+                        Optional
+                           .ofNullable(e.getETag())
+                           .ifPresent(v -> httpRequest.addHeader("If-Match", v));
+                    }
+
+                    // Invoke the delegate request function providing the modified request
+                    delegateRequestFn.accept(httpRequest);
+                }
+
+                @Override
+                public void onException(Exception ex) {
+                    delegateResponseHandler.onException(ex);
+                }
+
+                @Override
+                public void onCanceled() {
+                    delegateResponseHandler.onCanceled();
+                }
+            };
+
+            read(edm, resourcePath, null, endpointHttpHeaders, eTagReadHandler);
+        }
+    }
+
     private <T> void readContent(UriInfo uriInfo, InputStream content, Map<String, String> endpointHttpHeaders, Olingo4ResponseHandler<T> responseHandler) {
         try {
             responseHandler.onResponse(this.<T> readContent(uriInfo, content), endpointHttpHeaders);
diff --git a/components/camel-olingo4/camel-olingo4-api/src/test/java/org/apache/camel/component/olingo4/Olingo4AppAPITest.java b/components/camel-olingo4/camel-olingo4-api/src/test/java/org/apache/camel/component/olingo4/Olingo4AppAPITest.java
index 7422298..d6c7d2e 100644
--- a/components/camel-olingo4/camel-olingo4-api/src/test/java/org/apache/camel/component/olingo4/Olingo4AppAPITest.java
+++ b/components/camel-olingo4/camel-olingo4-api/src/test/java/org/apache/camel/component/olingo4/Olingo4AppAPITest.java
@@ -30,7 +30,6 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
-
 import org.apache.camel.component.olingo4.api.Olingo4App;
 import org.apache.camel.component.olingo4.api.Olingo4ResponseHandler;
 import org.apache.camel.component.olingo4.api.batch.Olingo4BatchChangeRequest;
@@ -95,6 +94,8 @@ public class Olingo4AppAPITest {
     private static final String PEOPLE = "People";
     private static final String TEST_PEOPLE = "People('russellwhyte')";
     private static final String TEST_AIRLINE = "Airlines('FM')";
+    private static final String TEST_AIRLINE_TO_UPDATE = "Airlines('AA')"; // Careful using this as it get updated!
+    private static final String TEST_AIRLINE_TO_DELETE = "Airlines('MU')"; // Careful using this as it gets deleted!
     private static final String TRIPS = "Trips";
     private static final String TEST_CREATE_RESOURCE_CONTENT_ID = "1";
     private static final String TEST_UPDATE_RESOURCE_CONTENT_ID = "2";
@@ -302,6 +303,140 @@ public class Olingo4AppAPITest {
         LOG.info("People count: {}", count);
     }
 
+    /**
+     * The Airline resource is implemented with Optimistic Concurrency.
+     * This requires an eTag to be first fetched via a read before performing
+     * patch, update, delete or merge operations.
+     *
+     * The test should complete successfully and not throw an error of the form
+     * 'The request need to have If-Match or If-None-Match header'
+     *
+     * @throws Exception
+     */
+    @Test
+    public void testDeleteOptimisticConcurrency() throws Exception {
+        // test simple property Airlines
+        final TestOlingo4ResponseHandler<ClientEntity> entityHandler = new TestOlingo4ResponseHandler<>();
+
+        olingoApp.read(edm, TEST_AIRLINE_TO_DELETE, null, null, entityHandler);
+
+        // Confirm presence of eTag
+        ClientEntity airline = entityHandler.await();
+        assertNotNull(airline);
+        assertNotNull(airline.getETag());
+
+        TestOlingo4ResponseHandler<HttpStatusCode> statusHandler = new TestOlingo4ResponseHandler<>();
+
+        //
+        // Call delete
+        //
+        olingoApp.delete(TEST_AIRLINE_TO_DELETE, null, statusHandler);
+
+        HttpStatusCode statusCode = statusHandler.await();
+        assertEquals(HttpStatusCode.NO_CONTENT, statusCode);
+        LOG.info("Deleted entity at {}", TEST_AIRLINE_TO_DELETE);
+
+        // Check for deleted entity
+        final TestOlingo4ResponseHandler<HttpStatusCode> responseHandler = new TestOlingo4ResponseHandler<>();
+        olingoApp.read(edm, TEST_AIRLINE_TO_DELETE, null, null, responseHandler);
+
+        statusCode = statusHandler.await();
+        assertEquals(HttpStatusCode.NO_CONTENT, statusCode);
+        LOG.info("Deleted entity at {}", TEST_AIRLINE_TO_DELETE);
+    }
+
+    /**
+     * The Airline resource is implemented with Optimistic Concurrency.
+     * This requires an eTag to be first fetched via a read before performing
+     * patch, update, delete or merge operations.
+     *
+     * The test should complete successfully and not throw an error of the form
+     * 'The request need to have If-Match or If-None-Match header'
+     *
+     * @throws Exception
+     */
+    @Test
+    public void testPatchOptimisticConcurrency() throws Exception {
+        // test simple property Airlines
+        final TestOlingo4ResponseHandler<ClientEntity> entityHandler = new TestOlingo4ResponseHandler<>();
+
+        olingoApp.read(edm, TEST_AIRLINE_TO_UPDATE, null, null, entityHandler);
+
+        // Confirm presence of eTag
+        ClientEntity airline = entityHandler.await();
+        assertNotNull(airline);
+        assertNotNull(airline.getETag());
+
+        TestOlingo4ResponseHandler<HttpStatusCode> statusHandler = new TestOlingo4ResponseHandler<>();
+        ClientEntity clientEntity = objFactory.newEntity(null);
+        String newAirlineName = "The Patched American Airlines";
+        clientEntity.getProperties().add(objFactory.newPrimitiveProperty("Name",
+                                                                         objFactory.newPrimitiveValueBuilder().buildString(newAirlineName)));
+
+        //
+        // Call patch
+        //
+        olingoApp.patch(edm, TEST_AIRLINE_TO_UPDATE, null, clientEntity, statusHandler);
+
+        HttpStatusCode statusCode = statusHandler.await();
+        assertEquals(HttpStatusCode.NO_CONTENT, statusCode);
+        LOG.info("Name property updated with status {}", statusCode.getStatusCode());
+
+        // Check for updated entity
+        final TestOlingo4ResponseHandler<ClientEntity> responseHandler = new TestOlingo4ResponseHandler<>();
+
+        olingoApp.read(edm, TEST_AIRLINE_TO_UPDATE, null, null, responseHandler);
+        ClientEntity entity = responseHandler.await();
+        assertEquals(newAirlineName, entity.getProperty("Name").getValue().toString());
+        LOG.info("Updated Single Entity:  {}", prettyPrint(entity));
+    }
+
+    /**
+     * The Airline resource is implemented with Optimistic Concurrency.
+     * This requires an eTag to be first fetched via a read before performing
+     * patch, update, delete or merge operations.
+     *
+     * The test should complete successfully and not throw an error of the form
+     * 'The request need to have If-Match or If-None-Match header'
+     *
+     * @throws Exception
+     */
+    @Test
+    public void testUpdateOptimisticConcurrency() throws Exception {
+        // test simple property Airlines
+        final TestOlingo4ResponseHandler<ClientEntity> entityHandler = new TestOlingo4ResponseHandler<>();
+
+        olingoApp.read(edm, TEST_AIRLINE_TO_UPDATE, null, null, entityHandler);
+
+        // Confirm presence of eTag
+        ClientEntity airline = entityHandler.await();
+        assertNotNull(airline);
+        assertNotNull(airline.getETag());
+
+        TestOlingo4ResponseHandler<HttpStatusCode> statusHandler = new TestOlingo4ResponseHandler<>();
+        ClientEntity clientEntity = objFactory.newEntity(null);
+        String newAirlineName = "The Updated American Airlines";
+        clientEntity.getProperties().add(objFactory.newPrimitiveProperty("Name",
+                                                                         objFactory.newPrimitiveValueBuilder().buildString(newAirlineName)));
+
+        //
+        // Call update
+        //
+        olingoApp.update(edm, TEST_AIRLINE_TO_UPDATE, null, clientEntity, statusHandler);
+
+        HttpStatusCode statusCode = statusHandler.await();
+        assertEquals(HttpStatusCode.NO_CONTENT, statusCode);
+        LOG.info("Name property updated with status {}", statusCode.getStatusCode());
+
+        // Check for updated entity
+        final TestOlingo4ResponseHandler<ClientEntity> responseHandler = new TestOlingo4ResponseHandler<>();
+
+        olingoApp.read(edm, TEST_AIRLINE_TO_UPDATE, null, null, responseHandler);
+        ClientEntity entity = responseHandler.await();
+        assertEquals(newAirlineName, entity.getProperty("Name").getValue().toString());
+        LOG.info("Updated Single Entity:  {}", prettyPrint(entity));
+    }
+
     @Test
     public void testCreateUpdateDeleteEntity() throws Exception {
 
diff --git a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentProducerTest.java b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentProducerTest.java
index 46e899e..2537347 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentProducerTest.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentProducerTest.java
@@ -156,7 +156,8 @@ public class Olingo4ComponentProducerTest extends AbstractOlingo4TestSupport {
         try {
             requestBody("direct:read-deleted-entity", null);
         } catch (CamelExecutionException e) {
-            assertEquals("Resource Not Found [HTTP/1.1 404 Not Found]", e.getCause().getMessage());
+            String causeMsg = e.getCause().getMessage();
+            assertTrue(causeMsg.contains("[HTTP/1.1 404 Not Found]"));
         }
     }
 
@@ -185,7 +186,8 @@ public class Olingo4ComponentProducerTest extends AbstractOlingo4TestSupport {
         try {
             requestBody("direct:read-deleted-entity", null);
         } catch (CamelExecutionException e) {
-            assertEquals("Resource Not Found [HTTP/1.1 404 Not Found]", e.getCause().getMessage());
+            String causeMsg = e.getCause().getMessage();
+            assertTrue(causeMsg.contains("[HTTP/1.1 404 Not Found]"));
         }
     }
 


[camel] 03/03: Camel-Olingo4: Fixed CS

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

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

commit 7605794d774cce2423cd1c0f8b3ec788521d77a5
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Aug 23 10:50:33 2019 +0200

    Camel-Olingo4: Fixed CS
---
 .../camel/component/olingo4/api/Olingo4App.java    |  87 +++++++++++-----
 .../olingo4/api/Olingo4ResponseHandler.java        |  18 ++--
 .../olingo4/api/batch/Olingo4BatchRequest.java     |   4 +-
 .../component/olingo4/api/batch/Operation.java     |  11 +-
 .../olingo4/api/impl/AbstractFutureCallback.java   |  12 +--
 .../component/olingo4/api/impl/Olingo4AppImpl.java | 113 ++++++++++-----------
 .../camel/component/olingo4/Olingo4AppAPITest.java |  65 ++++++------
 .../component/olingo4/Olingo4Configuration.java    |  69 +++++++------
 .../camel/component/olingo4/Olingo4Consumer.java   |  21 ++--
 .../camel/component/olingo4/Olingo4Endpoint.java   |   6 +-
 .../camel/component/olingo4/Olingo4Producer.java   |   8 +-
 .../olingo4/internal/Olingo4Constants.java         |   2 +-
 .../olingo4/Olingo4ComponentConsumerTest.java      | 109 ++++++++------------
 .../olingo4/Olingo4ComponentProducerTest.java      |   3 +-
 .../camel/component/olingo4/Olingo4RouteTest.java  |   4 +-
 15 files changed, 281 insertions(+), 251 deletions(-)

diff --git a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/Olingo4App.java b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/Olingo4App.java
index 0649a7c..fa6f9b6 100644
--- a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/Olingo4App.java
+++ b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/Olingo4App.java
@@ -31,36 +31,43 @@ public interface Olingo4App {
 
     /**
      * Sets Service base URI.
+     * 
      * @param serviceUri
      */
     void setServiceUri(String serviceUri);
 
     /**
      * Returns Service base URI.
+     * 
      * @return service base URI.
      */
     String getServiceUri();
 
     /**
      * Sets custom Http headers to add to every service request.
+     * 
      * @param httpHeaders custom Http headers.
      */
     void setHttpHeaders(Map<String, String> httpHeaders);
 
     /**
      * Returns custom Http headers.
+     * 
      * @return custom Http headers.
      */
     Map<String, String> getHttpHeaders();
 
     /**
-     * Returns content type for service calls. Defaults to <code>application/json;charset=utf-8</code>.
+     * Returns content type for service calls. Defaults to
+     * <code>application/json;charset=utf-8</code>.
+     * 
      * @return content type.
      */
     String getContentType();
 
     /**
      * Set default service call content type.
+     * 
      * @param contentType content type.
      */
     void setContentType(String contentType);
@@ -72,40 +79,54 @@ public interface Olingo4App {
 
     /**
      * Reads an OData resource and invokes callback with appropriate result.
-     * @param edm Service Edm, read from calling <code>read(null, "$metdata", null, responseHandler)</code>
+     * 
+     * @param edm Service Edm, read from calling
+     *            <code>read(null, "$metdata", null, responseHandler)</code>
      * @param resourcePath OData Resource path
      * @param queryParams OData query params
-     *                    http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html#_Toc453752288
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
+     *            http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html#_Toc453752288
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
      * @param responseHandler callback handler
      */
     <T> void read(Edm edm, String resourcePath, Map<String, String> queryParams, Map<String, String> endpointHttpHeaders, Olingo4ResponseHandler<T> responseHandler);
 
     /**
-     * Reads an OData resource and invokes callback with the unparsed input stream.
-     * @param edm Service Edm, read from calling <code>read(null, "$metdata", null, responseHandler)</code>
+     * Reads an OData resource and invokes callback with the unparsed input
+     * stream.
+     * 
+     * @param edm Service Edm, read from calling
+     *            <code>read(null, "$metdata", null, responseHandler)</code>
      * @param resourcePath OData Resource path
      * @param queryParams OData query params
-     *                    http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html#_Toc453752288
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
+     *            http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html#_Toc453752288
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
      * @param responseHandler callback handler
      */
     void uread(Edm edm, String resourcePath, Map<String, String> queryParams, Map<String, String> endpointHttpHeaders, Olingo4ResponseHandler<InputStream> responseHandler);
 
     /**
-     * Deletes an OData resource and invokes callback
-     * with {@link org.apache.olingo.commons.api.http.HttpStatusCode} on success, or with exception on failure.
+     * Deletes an OData resource and invokes callback with
+     * {@link org.apache.olingo.commons.api.http.HttpStatusCode} on success, or
+     * with exception on failure.
+     * 
      * @param resourcePath resource path for Entry
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
-     * @param responseHandler {@link org.apache.olingo.commons.api.http.HttpStatusCode} callback handler
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
+     * @param responseHandler
+     *        {@link org.apache.olingo.commons.api.http.HttpStatusCode} callback
+     *            handler
      */
     void delete(String resourcePath, Map<String, String> endpointHttpHeaders, Olingo4ResponseHandler<HttpStatusCode> responseHandler);
 
     /**
      * Creates a new OData resource.
+     * 
      * @param edm service Edm
      * @param resourcePath resource path to create
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
      * @param data request data
      * @param responseHandler callback handler
      */
@@ -113,50 +134,70 @@ public interface Olingo4App {
 
     /**
      * Updates an OData resource.
+     * 
      * @param edm service Edm
      * @param resourcePath resource path to update
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
      * @param data updated data
-     * @param responseHandler {@link org.apache.olingo.client.api.domain.ClientEntity} callback handler
+     * @param responseHandler
+     *        {@link org.apache.olingo.client.api.domain.ClientEntity} callback
+     *            handler
      */
     <T> void update(Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler);
 
     /**
      * Patches/merges an OData resource using HTTP PATCH.
+     * 
      * @param edm service Edm
      * @param resourcePath resource path to update
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
      * @param data patch/merge data
-     * @param responseHandler {@link org.apache.olingo.client.api.domain.ClientEntity} callback handler
+     * @param responseHandler
+     *        {@link org.apache.olingo.client.api.domain.ClientEntity} callback
+     *            handler
      */
     <T> void patch(Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler);
 
     /**
      * Patches/merges an OData resource using HTTP MERGE.
+     * 
      * @param edm service Edm
      * @param resourcePath resource path to update
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
      * @param data patch/merge data
-     * @param responseHandler {@link org.apache.olingo.client.api.domain.ClientEntity} callback handler
+     * @param responseHandler
+     *        {@link org.apache.olingo.client.api.domain.ClientEntity} callback
+     *            handler
      */
     <T> void merge(Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler);
 
     /**
      * Executes a batch request.
+     * 
      * @param edm service Edm
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
-     * @param data ordered {@link org.apache.camel.component.olingo4.api.batch.Olingo4BatchRequest} list
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
+     * @param data ordered
+     *            {@link org.apache.camel.component.olingo4.api.batch.Olingo4BatchRequest}
+     *            list
      * @param responseHandler callback handler
      */
     void batch(Edm edm, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<List<Olingo4BatchResponse>> responseHandler);
 
     /**
      * Calls a OData action
+     * 
      * @param edm service Edm
      * @param resourcePath resource path to action
-     * @param endpointHttpHeaders HTTP Headers to add/override the component versions
+     * @param endpointHttpHeaders HTTP Headers to add/override the component
+     *            versions
      * @param data action data
-     * @param responseHandler {@link org.apache.olingo.client.api.domain.ClientEntity} callback handler
+     * @param responseHandler
+     *        {@link org.apache.olingo.client.api.domain.ClientEntity} callback
+     *            handler
      */
     <T> void action(Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler);
 }
diff --git a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/Olingo4ResponseHandler.java b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/Olingo4ResponseHandler.java
index 01d9587..05bc2d0 100644
--- a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/Olingo4ResponseHandler.java
+++ b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/Olingo4ResponseHandler.java
@@ -25,22 +25,26 @@ public interface Olingo4ResponseHandler<T> {
 
     /**
      * Handle response data on successful completion of Olingo4 request.
-     * @param response response data from Olingo4, may be NULL for Olingo4 operations with no response data.
-     * @param responseHeaders the response HTTP headers received from the endpoint.
+     * 
+     * @param response response data from Olingo4, may be NULL for Olingo4
+     *            operations with no response data.
+     * @param responseHeaders the response HTTP headers received from the
+     *            endpoint.
      */
     void onResponse(T response, Map<String, String> responseHeaders);
 
     /**
      * Handle exception raised from Olingo4 request.
-     * @param ex exception from Olingo4 request.
-     * May be an instance of {@link org.apache.olingo.commons.api.ex.ODataException} or
-     * some other exception, such as {@link java.io.IOException}
+     * 
+     * @param ex exception from Olingo4 request. May be an instance of
+     *            {@link org.apache.olingo.commons.api.ex.ODataException} or
+     *            some other exception, such as {@link java.io.IOException}
      */
     void onException(Exception ex);
 
     /**
-     * Handle Olingo4 request cancellation.
-     * May be caused by the underlying HTTP connection being shutdown asynchronously.
+     * Handle Olingo4 request cancellation. May be caused by the underlying HTTP
+     * connection being shutdown asynchronously.
      */
     void onCanceled();
 }
diff --git a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/batch/Olingo4BatchRequest.java b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/batch/Olingo4BatchRequest.java
index 7815691..6b050f4 100644
--- a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/batch/Olingo4BatchRequest.java
+++ b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/batch/Olingo4BatchRequest.java
@@ -31,7 +31,7 @@ public abstract class Olingo4BatchRequest {
     public String getResourceUri() {
         return resourceUri;
     }
-    
+
     public String getResourcePath() {
         return resourcePath;
     }
@@ -42,4 +42,4 @@ public abstract class Olingo4BatchRequest {
 
     @Override
     public abstract String toString();
-}
\ No newline at end of file
+}
diff --git a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/batch/Operation.java b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/batch/Operation.java
index 921306c..bb9094d 100644
--- a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/batch/Operation.java
+++ b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/batch/Operation.java
@@ -17,15 +17,12 @@
 package org.apache.camel.component.olingo4.api.batch;
 
 /**
-* OData operation used by {@link org.apache.camel.component.olingo4.api.batch.Olingo4BatchChangeRequest}.
-*/
+ * OData operation used by
+ * {@link org.apache.camel.component.olingo4.api.batch.Olingo4BatchChangeRequest}.
+ */
 public enum Operation {
 
-    CREATE("POST"),
-    UPDATE("PUT"),
-    PATCH("PATCH"),
-    MERGE("MERGE"),
-    DELETE("DELETE");
+    CREATE("POST"), UPDATE("PUT"), PATCH("PATCH"), MERGE("MERGE"), DELETE("DELETE");
 
     private final String httpMethod;
 
diff --git a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/AbstractFutureCallback.java b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/AbstractFutureCallback.java
index 4cb62ca..09688ae 100644
--- a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/AbstractFutureCallback.java
+++ b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/AbstractFutureCallback.java
@@ -35,14 +35,14 @@ import org.apache.olingo.commons.api.http.HttpStatusCode;
 import static org.apache.camel.component.olingo4.api.impl.Olingo4Helper.getContentTypeHeader;
 
 /**
-* Helper implementation of {@link org.apache.http.concurrent.FutureCallback}
+ * Helper implementation of {@link org.apache.http.concurrent.FutureCallback}
  * for {@link org.apache.camel.component.olingo4.api.impl.Olingo4AppImpl}
-*/
+ */
 public abstract class AbstractFutureCallback<T> implements FutureCallback<HttpResponse> {
 
     public static final Pattern ODATA_MIME_TYPE_PATTERN = Pattern.compile("application/((atom)|(json)|(xml)).*");
     public static final int NETWORK_CONNECT_TIMEOUT_ERROR = 599;
-    
+
     private final Olingo4ResponseHandler<T> responseHandler;
 
     AbstractFutureCallback(Olingo4ResponseHandler<T> responseHandler) {
@@ -56,11 +56,11 @@ public abstract class AbstractFutureCallback<T> implements FutureCallback<HttpRe
             if (response.getEntity() != null) {
                 try {
                     final ContentType responseContentType = getContentTypeHeader(response);
-                              
+
                     if (responseContentType != null && ODATA_MIME_TYPE_PATTERN.matcher(responseContentType.toContentTypeString()).matches()) {
                         final ODataReader reader = ODataClientFactory.getClient().getReader();
                         final ODataError error = reader.readError(response.getEntity().getContent(), responseContentType);
-                        
+
                         throw new ODataClientErrorException(statusLine, error);
                     }
                 } catch (IOException e) {
@@ -86,7 +86,7 @@ public abstract class AbstractFutureCallback<T> implements FutureCallback<HttpRe
         } finally {
             if (result instanceof Closeable) {
                 try {
-                    ((Closeable) result).close();
+                    ((Closeable)result).close();
                 } catch (final IOException ignore) {
                 }
             }
diff --git a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
index 87f4ccb..9eb5d49 100644
--- a/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
+++ b/components/camel-olingo4/camel-olingo4-api/src/main/java/org/apache/camel/component/olingo4/api/impl/Olingo4AppImpl.java
@@ -111,6 +111,7 @@ import org.apache.olingo.server.api.uri.UriResourceKind;
 import org.apache.olingo.server.core.uri.parser.Parser;
 
 import static org.apache.camel.component.olingo4.api.impl.Olingo4Helper.getContentTypeHeader;
+
 /**
  * Application API used by Olingo4 Component.
  */
@@ -269,20 +270,20 @@ public final class Olingo4AppImpl implements Olingo4App {
     }
 
     @Override
-    public <T> void create(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data, final Olingo4ResponseHandler<T> responseHandler) {
+    public <T> void create(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data,
+                           final Olingo4ResponseHandler<T> responseHandler) {
         final UriInfo uriInfo = parseUri(edm, resourcePath, null, serviceUri);
 
         writeContent(edm, new HttpPost(createUri(resourcePath, null)), uriInfo, data, endpointHttpHeaders, responseHandler);
     }
 
     @Override
-    public <T> void update(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data, final Olingo4ResponseHandler<T> responseHandler) {
+    public <T> void update(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data,
+                           final Olingo4ResponseHandler<T> responseHandler) {
         final UriInfo uriInfo = parseUri(edm, resourcePath, null, serviceUri);
 
-        augmentWithETag(edm, resourcePath, endpointHttpHeaders,
-                        new HttpPut(createUri(resourcePath, null)),
-                        request -> writeContent(edm, (HttpPut) request, uriInfo, data, endpointHttpHeaders, responseHandler),
-                        responseHandler);
+        augmentWithETag(edm, resourcePath, endpointHttpHeaders, new HttpPut(createUri(resourcePath, null)),
+        request -> writeContent(edm, (HttpPut)request, uriInfo, data, endpointHttpHeaders, responseHandler), responseHandler);
     }
 
     @Override
@@ -299,30 +300,25 @@ public final class Olingo4AppImpl implements Olingo4App {
             });
         };
 
-        augmentWithETag(null, resourcePath, endpointHttpHeaders,
-                        deleteRequest,
-                        deleteFunction,
-                        responseHandler);
+        augmentWithETag(null, resourcePath, endpointHttpHeaders, deleteRequest, deleteFunction, responseHandler);
     }
 
     @Override
-    public <T> void patch(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data, final Olingo4ResponseHandler<T> responseHandler) {
+    public <T> void patch(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data,
+                          final Olingo4ResponseHandler<T> responseHandler) {
         final UriInfo uriInfo = parseUri(edm, resourcePath, null, serviceUri);
 
-        augmentWithETag(edm, resourcePath, endpointHttpHeaders,
-                        new HttpPatch(createUri(resourcePath, null)),
-                        request -> writeContent(edm, (HttpPatch) request, uriInfo, data, endpointHttpHeaders, responseHandler),
-                        responseHandler);
+        augmentWithETag(edm, resourcePath, endpointHttpHeaders, new HttpPatch(createUri(resourcePath, null)),
+        request -> writeContent(edm, (HttpPatch)request, uriInfo, data, endpointHttpHeaders, responseHandler), responseHandler);
     }
 
     @Override
-    public <T> void merge(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data, final Olingo4ResponseHandler<T> responseHandler) {
+    public <T> void merge(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data,
+                          final Olingo4ResponseHandler<T> responseHandler) {
         final UriInfo uriInfo = parseUri(edm, resourcePath, null, serviceUri);
 
-        augmentWithETag(edm, resourcePath, endpointHttpHeaders,
-                        new HttpMerge(createUri(resourcePath, null)),
-                        request -> writeContent(edm, (HttpMerge) request, uriInfo, data, endpointHttpHeaders, responseHandler),
-                        responseHandler);
+        augmentWithETag(edm, resourcePath, endpointHttpHeaders, new HttpMerge(createUri(resourcePath, null)),
+        request -> writeContent(edm, (HttpMerge)request, uriInfo, data, endpointHttpHeaders, responseHandler), responseHandler);
     }
 
     @Override
@@ -333,7 +329,8 @@ public final class Olingo4AppImpl implements Olingo4App {
     }
 
     @Override
-    public <T> void action(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data, final Olingo4ResponseHandler<T> responseHandler) {
+    public <T> void action(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final Object data,
+                           final Olingo4ResponseHandler<T> responseHandler) {
         final UriInfo uriInfo = parseUri(edm, resourcePath, null, serviceUri);
 
         writeContent(edm, new HttpPost(createUri(resourcePath, null)), uriInfo, data, endpointHttpHeaders, responseHandler);
@@ -367,28 +364,31 @@ public final class Olingo4AppImpl implements Olingo4App {
     }
 
     /**
-     * On occasion, some resources are protected with Optimistic Concurrency via the use of eTags.
-     * This will first conduct a read on the given entity resource, find its eTag then perform the given
-     * delegate request function, augmenting the request with the eTag, if appropriate.
-     *
-     * Since read operations may be asynchronous, it is necessary to chain together the methods via
-     * the use of a {@link Consumer} function. Only when the response from the read returns will
-     * this delegate function be executed.
+     * On occasion, some resources are protected with Optimistic Concurrency via
+     * the use of eTags. This will first conduct a read on the given entity
+     * resource, find its eTag then perform the given delegate request function,
+     * augmenting the request with the eTag, if appropriate. Since read
+     * operations may be asynchronous, it is necessary to chain together the
+     * methods via the use of a {@link Consumer} function. Only when the
+     * response from the read returns will this delegate function be executed.
      *
      * @param edm the Edm object to be interrogated
      * @param resourcePath the resource path of the entity to be operated on
-     * @param endpointHttpHeaders the headers provided from the endpoint which may be required for the read operation
-     * @param httpRequest the request to be updated, if appropriate, with the eTag and provided to the delegate request function
-     * @param delegateRequestFn the function to be invoked in response to the read operation
-     * @param delegateResponseHandler the response handler to respond if any errors occur during the read operation
+     * @param endpointHttpHeaders the headers provided from the endpoint which
+     *            may be required for the read operation
+     * @param httpRequest the request to be updated, if appropriate, with the
+     *            eTag and provided to the delegate request function
+     * @param delegateRequestFn the function to be invoked in response to the
+     *            read operation
+     * @param delegateResponseHandler the response handler to respond if any
+     *            errors occur during the read operation
      */
-    private <T> void augmentWithETag(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders,
-                                     final HttpRequestBase httpRequest,
-                                     final Consumer<HttpRequestBase> delegateRequestFn,
-                                     final Olingo4ResponseHandler<T> delegateResponseHandler) {
+    private <T> void augmentWithETag(final Edm edm, final String resourcePath, final Map<String, String> endpointHttpHeaders, final HttpRequestBase httpRequest,
+                                     final Consumer<HttpRequestBase> delegateRequestFn, final Olingo4ResponseHandler<T> delegateResponseHandler) {
 
         if (edm == null) {
-            // Can be the case if calling a delete then need to do a metadata call first
+            // Can be the case if calling a delete then need to do a metadata
+            // call first
             final Olingo4ResponseHandler<Edm> edmResponseHandler = new Olingo4ResponseHandler<Edm>() {
                 @Override
                 public void onResponse(Edm response, Map<String, String> responseHeaders) {
@@ -411,14 +411,16 @@ public final class Olingo4AppImpl implements Olingo4App {
 
             //
             // Reads the metadata to establish an Edm object
-            // then the response handler invokes this method again with the new edm object
+            // then the response handler invokes this method again with the new
+            // edm object
             //
             read(null, Constants.METADATA, null, null, edmResponseHandler);
 
         } else {
 
             //
-            // The handler that responds to the read operation and supplies an ETag if necessary
+            // The handler that responds to the read operation and supplies an
+            // ETag if necessary
             // and invokes the delegate request function
             //
             Olingo4ResponseHandler<T> eTagReadHandler = new Olingo4ResponseHandler<T>() {
@@ -426,13 +428,12 @@ public final class Olingo4AppImpl implements Olingo4App {
                 @Override
                 public void onResponse(T response, Map<String, String> responseHeaders) {
                     if (response instanceof ClientEntity) {
-                        ClientEntity e = (ClientEntity) response;
-                        Optional
-                           .ofNullable(e.getETag())
-                           .ifPresent(v -> httpRequest.addHeader("If-Match", v));
+                        ClientEntity e = (ClientEntity)response;
+                        Optional.ofNullable(e.getETag()).ifPresent(v -> httpRequest.addHeader("If-Match", v));
                     }
 
-                    // Invoke the delegate request function providing the modified request
+                    // Invoke the delegate request function providing the
+                    // modified request
                     delegateRequestFn.accept(httpRequest);
                 }
 
@@ -593,8 +594,7 @@ public final class Olingo4AppImpl implements Olingo4App {
                             switch (lastResourceKind) {
                             case action:
                             case entitySet:
-                                ClientEntity entity = odataReader.readEntity(result.getEntity().getContent(),
-                                                                             ContentType.parse(result.getEntity().getContentType().getValue()));
+                                ClientEntity entity = odataReader.readEntity(result.getEntity().getContent(), ContentType.parse(result.getEntity().getContentType().getValue()));
                                 responseHandler.onResponse((T)entity, headersToMap(result.getAllHeaders()));
                                 break;
                             default:
@@ -641,7 +641,7 @@ public final class Olingo4AppImpl implements Olingo4App {
         } else if (uriInfo.getKind() == UriInfoKind.batch) {
             final String boundary = BOUNDARY_PREFIX + UUID.randomUUID();
             final String contentHeader = BATCH_CONTENT_TYPE + BOUNDARY_PARAMETER + boundary;
-            final List<Olingo4BatchRequest> batchParts = (List<Olingo4BatchRequest>) content;
+            final List<Olingo4BatchRequest> batchParts = (List<Olingo4BatchRequest>)content;
 
             final InputStream requestStream = serializeBatchRequest(edm, batchParts, BOUNDARY_DOUBLE_DASH + boundary);
             httpEntity = writeContent(requestStream);
@@ -657,10 +657,10 @@ public final class Olingo4AppImpl implements Olingo4App {
         AbstractHttpEntity httpEntity;
 
         if (content instanceof ClientEntity) {
-            final InputStream requestStream = odataWriter.writeEntity((ClientEntity) content, getResourceContentType(uriInfo));
+            final InputStream requestStream = odataWriter.writeEntity((ClientEntity)content, getResourceContentType(uriInfo));
             httpEntity = writeContent(requestStream);
         } else if (content instanceof String) {
-            httpEntity = new StringEntity((String) content, org.apache.http.entity.ContentType.APPLICATION_JSON);
+            httpEntity = new StringEntity((String)content, org.apache.http.entity.ContentType.APPLICATION_JSON);
         } else {
             throw new ODataException("Unsupported content type: " + content);
         }
@@ -672,7 +672,7 @@ public final class Olingo4AppImpl implements Olingo4App {
 
     private AbstractHttpEntity writeContent(InputStream inputStream) throws ODataException {
         AbstractHttpEntity httpEntity;
-        
+
         try {
             httpEntity = new ByteArrayEntity(IOUtils.toByteArray(inputStream));
         } catch (IOException e) {
@@ -706,8 +706,7 @@ public final class Olingo4AppImpl implements Olingo4App {
                     batchRequestHeaderOutputStream.write(ODataStreamer.CRLF);
                     final ContentType acceptType = getResourceContentType(uriInfo);
                     final String acceptCharset = acceptType.getParameter(ContentType.PARAMETER_CHARSET);
-                    writeHttpHeader(batchRequestHeaderOutputStream, HttpHeaders.ACCEPT,
-                            contentType.getType().toLowerCase() + "/" + contentType.getSubtype().toLowerCase());
+                    writeHttpHeader(batchRequestHeaderOutputStream, HttpHeaders.ACCEPT, contentType.getType().toLowerCase() + "/" + contentType.getSubtype().toLowerCase());
                     if (null != acceptCharset) {
                         writeHttpHeader(batchRequestHeaderOutputStream, HttpHeaders.ACCEPT_CHARSET, acceptCharset.toLowerCase());
                     }
@@ -732,8 +731,7 @@ public final class Olingo4AppImpl implements Olingo4App {
                     writeHttpHeader(batchRequestHeaderOutputStream, HttpHeader.ODATA_VERSION, ODataServiceVersion.V40.toString());
                     final ContentType acceptType = getResourceContentType(uriInfo);
                     final String acceptCharset = acceptType.getParameter(ContentType.PARAMETER_CHARSET);
-                    writeHttpHeader(batchRequestHeaderOutputStream, HttpHeaders.ACCEPT,
-                            contentType.getType().toLowerCase() + "/" + contentType.getSubtype().toLowerCase());
+                    writeHttpHeader(batchRequestHeaderOutputStream, HttpHeaders.ACCEPT, contentType.getType().toLowerCase() + "/" + contentType.getSubtype().toLowerCase());
                     if (null != acceptCharset) {
                         writeHttpHeader(batchRequestHeaderOutputStream, HttpHeaders.ACCEPT_CHARSET, acceptCharset.toLowerCase());
                     }
@@ -944,7 +942,7 @@ public final class Olingo4AppImpl implements Olingo4App {
         }
         return result;
     }
-    
+
     private static Map<String, String> headersToMap(final Header[] headers) {
         final Map<String, String> responseHeaders = new HashMap<>();
         for (Header header : headers) {
@@ -957,8 +955,7 @@ public final class Olingo4AppImpl implements Olingo4App {
         // add accept header when its not a form or multipart
         if (!ContentType.APPLICATION_FORM_URLENCODED.equals(contentType) && !contentType.toContentTypeString().startsWith(MULTIPART_MIME_TYPE)) {
             // otherwise accept what is being sent
-            httpUriRequest.addHeader(HttpHeaders.ACCEPT,
-                    contentType.getType().toLowerCase() + "/" + contentType.getSubtype().toLowerCase());
+            httpUriRequest.addHeader(HttpHeaders.ACCEPT, contentType.getType().toLowerCase() + "/" + contentType.getSubtype().toLowerCase());
             final String acceptCharset = contentType.getParameter(ContentType.PARAMETER_CHARSET);
             if (null != acceptCharset) {
                 httpUriRequest.addHeader(HttpHeaders.ACCEPT_CHARSET, acceptCharset.toLowerCase());
@@ -976,7 +973,7 @@ public final class Olingo4AppImpl implements Olingo4App {
                 httpUriRequest.setHeader(entry.getKey(), entry.getValue());
             }
         }
-        
+
         // set user specified endpoint headers
         if (ObjectHelper.isNotEmpty(endpointHttpHeaders)) {
             for (Map.Entry<String, String> entry : endpointHttpHeaders.entrySet()) {
diff --git a/components/camel-olingo4/camel-olingo4-api/src/test/java/org/apache/camel/component/olingo4/Olingo4AppAPITest.java b/components/camel-olingo4/camel-olingo4-api/src/test/java/org/apache/camel/component/olingo4/Olingo4AppAPITest.java
index d6c7d2e..66f7e2e 100644
--- a/components/camel-olingo4/camel-olingo4-api/src/test/java/org/apache/camel/component/olingo4/Olingo4AppAPITest.java
+++ b/components/camel-olingo4/camel-olingo4-api/src/test/java/org/apache/camel/component/olingo4/Olingo4AppAPITest.java
@@ -94,8 +94,20 @@ public class Olingo4AppAPITest {
     private static final String PEOPLE = "People";
     private static final String TEST_PEOPLE = "People('russellwhyte')";
     private static final String TEST_AIRLINE = "Airlines('FM')";
-    private static final String TEST_AIRLINE_TO_UPDATE = "Airlines('AA')"; // Careful using this as it get updated!
-    private static final String TEST_AIRLINE_TO_DELETE = "Airlines('MU')"; // Careful using this as it gets deleted!
+    private static final String TEST_AIRLINE_TO_UPDATE = "Airlines('AA')"; // Careful
+                                                                           // using
+                                                                           // this
+                                                                           // as
+                                                                           // it
+                                                                           // get
+                                                                           // updated!
+    private static final String TEST_AIRLINE_TO_DELETE = "Airlines('MU')"; // Careful
+                                                                           // using
+                                                                           // this
+                                                                           // as
+                                                                           // it
+                                                                           // gets
+                                                                           // deleted!
     private static final String TRIPS = "Trips";
     private static final String TEST_CREATE_RESOURCE_CONTENT_ID = "1";
     private static final String TEST_UPDATE_RESOURCE_CONTENT_ID = "2";
@@ -304,12 +316,11 @@ public class Olingo4AppAPITest {
     }
 
     /**
-     * The Airline resource is implemented with Optimistic Concurrency.
-     * This requires an eTag to be first fetched via a read before performing
-     * patch, update, delete or merge operations.
-     *
-     * The test should complete successfully and not throw an error of the form
-     * 'The request need to have If-Match or If-None-Match header'
+     * The Airline resource is implemented with Optimistic Concurrency. This
+     * requires an eTag to be first fetched via a read before performing patch,
+     * update, delete or merge operations. The test should complete successfully
+     * and not throw an error of the form 'The request need to have If-Match or
+     * If-None-Match header'
      *
      * @throws Exception
      */
@@ -346,12 +357,11 @@ public class Olingo4AppAPITest {
     }
 
     /**
-     * The Airline resource is implemented with Optimistic Concurrency.
-     * This requires an eTag to be first fetched via a read before performing
-     * patch, update, delete or merge operations.
-     *
-     * The test should complete successfully and not throw an error of the form
-     * 'The request need to have If-Match or If-None-Match header'
+     * The Airline resource is implemented with Optimistic Concurrency. This
+     * requires an eTag to be first fetched via a read before performing patch,
+     * update, delete or merge operations. The test should complete successfully
+     * and not throw an error of the form 'The request need to have If-Match or
+     * If-None-Match header'
      *
      * @throws Exception
      */
@@ -370,8 +380,7 @@ public class Olingo4AppAPITest {
         TestOlingo4ResponseHandler<HttpStatusCode> statusHandler = new TestOlingo4ResponseHandler<>();
         ClientEntity clientEntity = objFactory.newEntity(null);
         String newAirlineName = "The Patched American Airlines";
-        clientEntity.getProperties().add(objFactory.newPrimitiveProperty("Name",
-                                                                         objFactory.newPrimitiveValueBuilder().buildString(newAirlineName)));
+        clientEntity.getProperties().add(objFactory.newPrimitiveProperty("Name", objFactory.newPrimitiveValueBuilder().buildString(newAirlineName)));
 
         //
         // Call patch
@@ -392,12 +401,11 @@ public class Olingo4AppAPITest {
     }
 
     /**
-     * The Airline resource is implemented with Optimistic Concurrency.
-     * This requires an eTag to be first fetched via a read before performing
-     * patch, update, delete or merge operations.
-     *
-     * The test should complete successfully and not throw an error of the form
-     * 'The request need to have If-Match or If-None-Match header'
+     * The Airline resource is implemented with Optimistic Concurrency. This
+     * requires an eTag to be first fetched via a read before performing patch,
+     * update, delete or merge operations. The test should complete successfully
+     * and not throw an error of the form 'The request need to have If-Match or
+     * If-None-Match header'
      *
      * @throws Exception
      */
@@ -416,8 +424,7 @@ public class Olingo4AppAPITest {
         TestOlingo4ResponseHandler<HttpStatusCode> statusHandler = new TestOlingo4ResponseHandler<>();
         ClientEntity clientEntity = objFactory.newEntity(null);
         String newAirlineName = "The Updated American Airlines";
-        clientEntity.getProperties().add(objFactory.newPrimitiveProperty("Name",
-                                                                         objFactory.newPrimitiveValueBuilder().buildString(newAirlineName)));
+        clientEntity.getProperties().add(objFactory.newPrimitiveProperty("Name", objFactory.newPrimitiveValueBuilder().buildString(newAirlineName)));
 
         //
         // Call update
@@ -571,8 +578,8 @@ public class Olingo4AppAPITest {
         assertEquals(HttpStatusCode.NO_CONTENT, statusCode);
     }
 
-
-    // Unfortunately there is no action that returns a client entity. So we fake one
+    // Unfortunately there is no action that returns a client entity. So we fake
+    // one
     @Test
     public void testBoundActionRequestWithClientEntityResponse() throws Exception {
         final ODataClient odataClient = ODataClientFactory.getClient();
@@ -584,10 +591,8 @@ public class Olingo4AppAPITest {
             public void process(HttpResponse response, HttpContext context) throws HttpException, IOException {
                 if (response.getStatusLine().getStatusCode() == HttpStatusCode.NO_CONTENT.getStatusCode()) {
                     try {
-                        response.setEntity(
-                                new InputStreamEntity(
-                                        odataWriter.writeEntity(createEntity(), ContentType.JSON),
-                                        org.apache.http.entity.ContentType.parse(ContentType.JSON.toContentTypeString())));
+                        response.setEntity(new InputStreamEntity(odataWriter.writeEntity(createEntity(), ContentType.JSON),
+                                                                 org.apache.http.entity.ContentType.parse(ContentType.JSON.toContentTypeString())));
                         response.setStatusCode(HttpStatusCode.OK.getStatusCode());
                     } catch (ODataSerializerException e) {
                         throw new IOException(e);
diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Configuration.java b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Configuration.java
index 8702458..6af68aa 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Configuration.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Configuration.java
@@ -41,7 +41,8 @@ public class Olingo4Configuration {
     @UriPath
     @Metadata(required = true)
     private Olingo4ApiName apiName;
-    @UriPath @Metadata(required = true)
+    @UriPath
+    @Metadata(required = true)
     private String methodName;
     @UriParam
     private String serviceUri;
@@ -91,7 +92,8 @@ public class Olingo4Configuration {
     }
 
     /**
-     * Target OData service base URI, e.g. http://services.odata.org/OData/OData.svc
+     * Target OData service base URI, e.g.
+     * http://services.odata.org/OData/OData.svc
      */
     public void setServiceUri(String serviceUri) {
         this.serviceUri = serviceUri;
@@ -102,7 +104,8 @@ public class Olingo4Configuration {
     }
 
     /**
-     * Content-Type header value can be used to specify JSON or XML message format, defaults to application/json;charset=utf-8
+     * Content-Type header value can be used to specify JSON or XML message
+     * format, defaults to application/json;charset=utf-8
      */
     public void setContentType(String contentType) {
         this.contentType = contentType;
@@ -113,7 +116,8 @@ public class Olingo4Configuration {
     }
 
     /**
-     * Custom HTTP headers to inject into every request, this could include OAuth tokens, etc.
+     * Custom HTTP headers to inject into every request, this could include
+     * OAuth tokens, etc.
      */
     public void setHttpHeaders(Map<String, String> httpHeaders) {
         this.httpHeaders = httpHeaders;
@@ -124,7 +128,8 @@ public class Olingo4Configuration {
     }
 
     /**
-     * HTTP connection creation timeout in milliseconds, defaults to 30,000 (30 seconds)
+     * HTTP connection creation timeout in milliseconds, defaults to 30,000 (30
+     * seconds)
      */
     public void setConnectTimeout(int connectTimeout) {
         this.connectTimeout = connectTimeout;
@@ -168,8 +173,10 @@ public class Olingo4Configuration {
     }
 
     /**
-     * Custom HTTP async client builder for more complex HTTP client configuration, overrides connectionTimeout, socketTimeout, proxy and sslContext.
-     * Note that a socketTimeout MUST be specified in the builder, otherwise OData requests could block indefinitely
+     * Custom HTTP async client builder for more complex HTTP client
+     * configuration, overrides connectionTimeout, socketTimeout, proxy and
+     * sslContext. Note that a socketTimeout MUST be specified in the builder,
+     * otherwise OData requests could block indefinitely
      */
     public void setHttpAsyncClientBuilder(HttpAsyncClientBuilder httpAsyncClientBuilder) {
         this.httpAsyncClientBuilder = httpAsyncClientBuilder;
@@ -180,8 +187,10 @@ public class Olingo4Configuration {
     }
 
     /**
-     * Custom HTTP client builder for more complex HTTP client configuration, overrides connectionTimeout, socketTimeout, proxy and sslContext.
-     * Note that a socketTimeout MUST be specified in the builder, otherwise OData requests could block indefinitely
+     * Custom HTTP client builder for more complex HTTP client configuration,
+     * overrides connectionTimeout, socketTimeout, proxy and sslContext. Note
+     * that a socketTimeout MUST be specified in the builder, otherwise OData
+     * requests could block indefinitely
      */
     public void setHttpClientBuilder(HttpClientBuilder httpClientBuilder) {
         this.httpClientBuilder = httpClientBuilder;
@@ -195,7 +204,9 @@ public class Olingo4Configuration {
     }
 
     /**
-     * Set this to true to filter out results that have already been communicated by this component.
+     * Set this to true to filter out results that have already been
+     * communicated by this component.
+     * 
      * @param filterAlreadySeen
      */
     public void setFilterAlreadySeen(boolean filterAlreadySeen) {
@@ -204,33 +215,27 @@ public class Olingo4Configuration {
 
     @Override
     public int hashCode() {
-        return new HashCodeBuilder()
-            .append(serviceUri)
-            .append(contentType)
-            .append(httpHeaders)
-            .append(connectTimeout)
-            .append(socketTimeout)
-            .append(proxy)
-            .append(sslContextParameters)
-            .append(httpAsyncClientBuilder)
-            .append(httpClientBuilder)
-            .hashCode();
+        return new HashCodeBuilder().append(serviceUri).append(contentType).append(httpHeaders).append(connectTimeout).append(socketTimeout).append(proxy)
+            .append(sslContextParameters).append(httpAsyncClientBuilder).append(httpClientBuilder).hashCode();
     }
 
     @Override
     public boolean equals(Object obj) {
         if (obj instanceof Olingo4Configuration) {
-            Olingo4Configuration other = (Olingo4Configuration) obj;
-            return serviceUri == null ? other.serviceUri == null : serviceUri.equals(other.serviceUri)
-                && contentType == null ? other.contentType == null : contentType.equals(other.contentType)
-                && httpHeaders == null ? other.httpHeaders == null : httpHeaders.equals(other.httpHeaders)
-                && connectTimeout == other.connectTimeout
-                && socketTimeout == other.socketTimeout
-                && proxy == null ? other.proxy == null : proxy.equals(other.proxy)
-                && sslContextParameters == null ? other.sslContextParameters == null : sslContextParameters.equals(other.sslContextParameters)
-                && httpAsyncClientBuilder == null ? other.httpAsyncClientBuilder == null
-                : httpAsyncClientBuilder.equals(other.httpAsyncClientBuilder)
-                && httpClientBuilder == null ? other.httpClientBuilder == null : httpClientBuilder.equals(other.httpClientBuilder);
+            Olingo4Configuration other = (Olingo4Configuration)obj;
+            return serviceUri == null
+                ? other.serviceUri == null
+                : serviceUri.equals(other.serviceUri) && contentType == null
+                    ? other.contentType == null
+                    : contentType.equals(other.contentType) && httpHeaders == null
+                        ? other.httpHeaders == null
+                        : httpHeaders.equals(other.httpHeaders) && connectTimeout == other.connectTimeout && socketTimeout == other.socketTimeout && proxy == null
+                            ? other.proxy == null
+                            : proxy.equals(other.proxy) && sslContextParameters == null
+                                ? other.sslContextParameters == null
+                                : sslContextParameters.equals(other.sslContextParameters) && httpAsyncClientBuilder == null
+                                    ? other.httpAsyncClientBuilder == null : httpAsyncClientBuilder.equals(other.httpAsyncClientBuilder) && httpClientBuilder == null
+                                        ? other.httpClientBuilder == null : httpClientBuilder.equals(other.httpClientBuilder);
         }
         return false;
     }
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 778e0cb..3fcb9b9 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
@@ -97,10 +97,10 @@ public class Olingo4Consumer extends AbstractApiConsumer<Olingo4ApiName, Olingo4
             }
 
             //
-            // Allow consumer idle properties to properly handle an empty polling response
+            // Allow consumer idle properties to properly handle an empty
+            // polling response
             //
-            if ((result[0] == null)
-                || (result[0] instanceof ClientEntitySet && (((ClientEntitySet) result[0]).getEntities().isEmpty()))) {
+            if ((result[0] == null) || (result[0] instanceof ClientEntitySet && (((ClientEntitySet)result[0]).getEntities().isEmpty()))) {
                 return 0;
             } else {
                 int processed = ApiConsumerHelper.getResultsProcessed(this, result[0], isSplitResult());
@@ -115,7 +115,8 @@ public class Olingo4Consumer extends AbstractApiConsumer<Olingo4ApiName, Olingo4
     @Override
     public void interceptProperties(Map<String, Object> properties) {
         //
-        // If we have a filterAlreadySeen property then initialise the filter index
+        // If we have a filterAlreadySeen property then initialise the filter
+        // index
         //
         Object value = properties.get(Olingo4Endpoint.FILTER_ALREADY_SEEN);
         if (value == null) {
@@ -123,7 +124,8 @@ public class Olingo4Consumer extends AbstractApiConsumer<Olingo4ApiName, Olingo4
         }
 
         //
-        // Initialise the index if not already and if filterAlreadySeen has been set
+        // Initialise the index if not already and if filterAlreadySeen has been
+        // set
         //
         if (Boolean.parseBoolean(value.toString()) && resultIndex == null) {
             resultIndex = new Olingo4Index();
@@ -144,21 +146,20 @@ public class Olingo4Consumer extends AbstractApiConsumer<Olingo4ApiName, Olingo4
         List<Object> splitResult = new ArrayList<>();
 
         if (result instanceof ClientEntitySet) {
-            ClientEntitySet entitySet = (ClientEntitySet) result;
+            ClientEntitySet entitySet = (ClientEntitySet)result;
             for (ClientEntity entity : entitySet.getEntities()) {
                 //
                 // If $count has been set to true then this value is left behind
                 // on the ClientEntitySet. Therefore, append it to each result.
                 //
                 if (entitySet.getCount() != null) {
-                    ClientValue value = new ClientPrimitiveValueImpl.BuilderImpl()
-                                                            .buildInt32(entitySet.getCount());
+                    ClientValue value = new ClientPrimitiveValueImpl.BuilderImpl().buildInt32(entitySet.getCount());
                     entity.getProperties().add(new ClientPropertyImpl("ResultCount", value));
                 }
                 splitResult.add(entity);
             }
-        } else if (result instanceof ClientValue && ((ClientValue) result).isCollection()) {
-            ClientValue value = (ClientValue) result;
+        } else if (result instanceof ClientValue && ((ClientValue)result).isCollection()) {
+            ClientValue value = (ClientValue)result;
             ClientCollectionValue<ClientValue> collection = value.asCollection();
             collection.forEach(v -> {
                 splitResult.add(v);
diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
index 8c4cc2b..8a3d52c 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
@@ -166,7 +166,7 @@ public class Olingo4Endpoint extends AbstractApiEndpoint<Olingo4ApiName, Olingo4
 
     @Override
     public void interceptProperties(Map<String, Object> properties) {
-        Map<String, String> endpointHttpHeaders = (Map<String, String>) properties.get(ENDPOINT_HTTP_HEADERS_PROPERTY);
+        Map<String, String> endpointHttpHeaders = (Map<String, String>)properties.get(ENDPOINT_HTTP_HEADERS_PROPERTY);
 
         // read Edm if not set yet
         properties.put(EDM_PROPERTY, apiProxy.getEdm(endpointHttpHeaders));
@@ -206,8 +206,8 @@ public class Olingo4Endpoint extends AbstractApiEndpoint<Olingo4ApiName, Olingo4
             final String paramName = entry.getKey();
 
             /**
-             * Avoid swallowing consumer scheduler properties, which
-             * get processed in configureProperties()
+             * Avoid swallowing consumer scheduler properties, which get
+             * processed in configureProperties()
              */
             if (paramName.startsWith("consumer.")) {
                 continue;
diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Producer.java b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Producer.java
index 5ae3373..bebb619 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Producer.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Producer.java
@@ -67,7 +67,7 @@ public class Olingo4Producer extends AbstractApiProducer<Olingo4ApiName, Olingo4
                 exchange.getOut().setBody(response);
                 // copy headers
                 exchange.getOut().setHeaders(exchange.getIn().getHeaders());
-                
+
                 // Add http response headers
                 exchange.getOut().setHeader(Olingo4Constants.PROPERTY_PREFIX + Olingo4Constants.RESPONSE_HTTP_HEADERS, responseHeaders);
 
@@ -115,7 +115,8 @@ public class Olingo4Producer extends AbstractApiProducer<Olingo4ApiName, Olingo4
     @Override
     public void interceptProperties(Map<String, Object> properties) {
         //
-        // If we have a filterAlreadySeen property then initialise the filter index
+        // If we have a filterAlreadySeen property then initialise the filter
+        // index
         //
         Object value = properties.get(Olingo4Endpoint.FILTER_ALREADY_SEEN);
         if (value == null) {
@@ -123,7 +124,8 @@ public class Olingo4Producer extends AbstractApiProducer<Olingo4ApiName, Olingo4
         }
 
         //
-        // Initialise the index if not already and if filterAlreadySeen has been set
+        // Initialise the index if not already and if filterAlreadySeen has been
+        // set
         //
         if (Boolean.parseBoolean(value.toString()) && resultIndex == null) {
             resultIndex = new Olingo4Index();
diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/internal/Olingo4Constants.java b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/internal/Olingo4Constants.java
index 240005f..700b897 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/internal/Olingo4Constants.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/internal/Olingo4Constants.java
@@ -26,6 +26,6 @@ public interface Olingo4Constants {
 
     // thread profile name for this component
     String THREAD_PROFILE_NAME = "CamelOlingo4";
-    
+
     String RESPONSE_HTTP_HEADERS = "responseHttpHeaders";
 }
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
index c81b174..bbad81e 100644
--- 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
@@ -55,9 +55,7 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
 
         RouteBuilder builder = new RouteBuilder() {
             public void configure() {
-                from("olingo4://read/" + PEOPLE + "?"
-                        + "$filter=LastName eq 'Whyte'&$expand=Trips")
-                    .to("mock:consumer-query");
+                from("olingo4://read/" + PEOPLE + "?" + "$filter=LastName eq 'Whyte'&$expand=Trips").to("mock:consumer-query");
             };
         };
         addRouteAndStartContext(builder);
@@ -72,7 +70,7 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
                 // First polled messages contained all the entities
                 //
                 assertTrue(body instanceof ClientEntity);
-                ClientEntity e = (ClientEntity) body;
+                ClientEntity e = (ClientEntity)body;
                 ClientProperty nameProp = e.getProperty("UserName");
                 assertNotNull(nameProp);
                 assertEquals("russellwhyte", nameProp.getValue().toString());
@@ -81,16 +79,14 @@ public class Olingo4ComponentConsumerTest 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
+     * 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 {
@@ -117,7 +113,7 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
                 // First polled messages contained all the entities
                 //
                 assertTrue(body instanceof ClientEntitySet);
-                ClientEntitySet set = (ClientEntitySet) body;
+                ClientEntitySet set = (ClientEntitySet)body;
                 assertEquals(expectedEntities, set.getEntities().size());
             } else {
                 //
@@ -130,16 +126,13 @@ public class Olingo4ComponentConsumerTest 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.
-     * - consumer.sendEmptyMessageWhenIdle is set to false so only 1 message should
-     *   even be returned.
+     * 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. -
+     * consumer.sendEmptyMessageWhenIdle is set to false so only 1 message
+     * should even be returned.
      */
     @Test
     public void testConsumerReadFilterAlreadySeenNoEmptyMsgs() throws Exception {
@@ -175,14 +168,12 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
         // Only polled message contains all the entities
         //
         assertTrue(body instanceof ClientEntitySet);
-        ClientEntitySet set = (ClientEntitySet) body;
+        ClientEntitySet set = (ClientEntitySet)body;
         assertEquals(expectedEntities, set.getEntities().size());
     }
 
     /**
-     * WithPredicate in address
-     * FilterAlreadySeen: true
-     * SplitResults: true
+     * WithPredicate in address FilterAlreadySeen: true SplitResults: true
      * consumer.sendEmptyMessageWhenIdle: true
      *
      * @throws Exception
@@ -195,11 +186,8 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
 
         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");
+                from("olingo4://read/" + AIRPORTS + "('KSFO')" + "?filterAlreadySeen=true&" + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=true&"
+                     + "consumer.splitResult=true").to("mock:consumer-splitresult-kp-airport");
             };
         };
         addRouteAndStartContext(builder);
@@ -214,7 +202,7 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
                 // First polled messages contained all the entities
                 //
                 assertTrue(body instanceof ClientEntity);
-                ClientEntity ksfoEntity = (ClientEntity) body;
+                ClientEntity ksfoEntity = (ClientEntity)body;
                 ClientProperty nameProp = ksfoEntity.getProperty("Name");
                 assertNotNull(nameProp);
                 assertEquals("San Francisco International Airport", nameProp.getValue().toString());
@@ -229,9 +217,7 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
     }
 
     /**
-     * WithPredicate in address
-     * FilterAlreadySeen: true
-     * SplitResults: true
+     * WithPredicate in address FilterAlreadySeen: true SplitResults: true
      * consumer.sendEmptyMessageWhenIdle: false
      *
      * @throws Exception
@@ -250,11 +236,8 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
 
         RouteBuilder builder = new RouteBuilder() {
             public void configure() {
-                from("olingo4://read/" + AIRPORTS + "('KSFO')"
-                        + "?filterAlreadySeen=true&"
-                        + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=false&"
-                        + "consumer.splitResult=true")
-                    .to("mock:consumer-splitresult-kp-airport");
+                from("olingo4://read/" + AIRPORTS + "('KSFO')" + "?filterAlreadySeen=true&" + "consumer.delay=2&consumer.sendEmptyMessageWhenIdle=false&"
+                     + "consumer.splitResult=true").to("mock:consumer-splitresult-kp-airport");
             };
         };
         addRouteAndStartContext(builder);
@@ -273,15 +256,15 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
         // Only polled message contains the entity
         //
         assertTrue(body instanceof ClientEntity);
-        ClientEntity ksfoEntity = (ClientEntity) body;
+        ClientEntity ksfoEntity = (ClientEntity)body;
         ClientProperty nameProp = ksfoEntity.getProperty("Name");
         assertNotNull(nameProp);
         assertEquals("San Francisco International Airport", nameProp.getValue().toString());
     }
 
     /**
-     * Read entity set of the People object and split the results
-     * into individual messages
+     * Read entity set of the People object and split the results into
+     * individual messages
      */
     @Test
     public void testConsumerReadSplitResults() throws Exception {
@@ -291,8 +274,7 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
 
         RouteBuilder builder = new RouteBuilder() {
             public void configure() {
-                from("olingo4://read/" + PEOPLE + "?consumer.splitResult=true")
-                    .to("mock:consumer-splitresult");
+                from("olingo4://read/" + PEOPLE + "?consumer.splitResult=true").to("mock:consumer-splitresult");
             };
         };
         addRouteAndStartContext(builder);
@@ -309,7 +291,7 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
             ClientProperty nameProperty = entity.getProperty("UserName");
             assertNotNull(nameProperty);
 
-            switch(i) {
+            switch (i) {
             case 0:
                 assertEquals("russellwhyte", nameProperty.getValue().toString());
                 break;
@@ -325,8 +307,8 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
     }
 
     /**
-     * Read value of the People object and split the results
-     * into individual messages
+     * Read value of the People object and split the results into individual
+     * messages
      */
     @Test
     public void testConsumerReadClientValuesSplitResults() throws Exception {
@@ -335,8 +317,7 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
 
         RouteBuilder builder = new RouteBuilder() {
             public void configure() {
-                from("olingo4://read/" + TEST_PEOPLE + "/FavoriteFeature?consumer.splitResult=true")
-                    .to("mock:consumer-splitresult-value");
+                from("olingo4://read/" + TEST_PEOPLE + "/FavoriteFeature?consumer.splitResult=true").to("mock:consumer-splitresult-value");
             };
         };
         addRouteAndStartContext(builder);
@@ -347,13 +328,13 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
         //
         Object body = mockEndpoint.getExchanges().get(0).getIn().getBody();
         assertIsInstanceOf(ClientPrimitiveValue.class, body);
-        ClientPrimitiveValue value = (ClientPrimitiveValue) body;
+        ClientPrimitiveValue value = (ClientPrimitiveValue)body;
         assertEquals("Feature1", value.toString());
     }
 
     /**
-     * Read value of the People object's AddressInfo collection value
-     * & split the results into individual messages for each address
+     * Read value of the People object's AddressInfo collection value & split
+     * the results into individual messages for each address
      */
     @Test
     public void testConsumerReadClientCollectionValuesSplitResults() throws Exception {
@@ -362,8 +343,7 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
 
         RouteBuilder builder = new RouteBuilder() {
             public void configure() {
-                from("olingo4://read/" + TEST_PEOPLE + "/AddressInfo?consumer.splitResult=true")
-                    .to("mock:consumer-splitresult-collection-value");
+                from("olingo4://read/" + TEST_PEOPLE + "/AddressInfo?consumer.splitResult=true").to("mock:consumer-splitresult-collection-value");
             };
         };
         addRouteAndStartContext(builder);
@@ -374,13 +354,13 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
         //
         Object body = mockEndpoint.getExchanges().get(0).getIn().getBody();
         assertIsInstanceOf(ClientComplexValue.class, body);
-        ClientComplexValue value = (ClientComplexValue) body;
+        ClientComplexValue value = (ClientComplexValue)body;
         assertEquals("Boise", value.get("City").getComplexValue().get("Name").getValue().toString());
     }
 
     /**
-     * Read value of the People object's AddressInfo collection value
-     * & split the results into individual messages for each address
+     * Read value of the People object's AddressInfo collection value & split
+     * the results into individual messages for each address
      */
     @Test
     public void testConsumerReadClientCollectionValuesNoSplitResults() throws Exception {
@@ -389,8 +369,7 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
 
         RouteBuilder builder = new RouteBuilder() {
             public void configure() {
-                from("olingo4://read/" + TEST_PEOPLE + "/AddressInfo?consumer.splitResult=false")
-                    .to("mock:consumer-nosplitresult-colleciton-value");
+                from("olingo4://read/" + TEST_PEOPLE + "/AddressInfo?consumer.splitResult=false").to("mock:consumer-nosplitresult-colleciton-value");
             };
         };
         addRouteAndStartContext(builder);
@@ -401,12 +380,12 @@ public class Olingo4ComponentConsumerTest extends AbstractOlingo4TestSupport {
         //
         Object body = mockEndpoint.getExchanges().get(0).getIn().getBody();
         assertIsInstanceOf(ClientCollectionValue.class, body);
-        ClientCollectionValue<?> value = (ClientCollectionValue<?>) body;
+        ClientCollectionValue<?> value = (ClientCollectionValue<?>)body;
         assertEquals(1, value.size());
         Iterator<?> propIter = value.iterator();
         Object propValueObj = propIter.next();
         assertIsInstanceOf(ClientComplexValue.class, propValueObj);
-        ClientComplexValue propValue = (ClientComplexValue) propValueObj;
+        ClientComplexValue propValue = (ClientComplexValue)propValueObj;
         assertEquals("Boise", propValue.get("City").getComplexValue().get("Name").getValue().toString());
     }
 }
diff --git a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentProducerTest.java b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentProducerTest.java
index 2537347..07079bb 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentProducerTest.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4ComponentProducerTest.java
@@ -109,7 +109,7 @@ public class Olingo4ComponentProducerTest extends AbstractOlingo4TestSupport {
         Iterator<?> propIter = collectionProperty.iterator();
         Object propValueObj = propIter.next();
         assertIsInstanceOf(ClientComplexValue.class, propValueObj);
-        ClientComplexValue propValue = (ClientComplexValue) propValueObj;
+        ClientComplexValue propValue = (ClientComplexValue)propValueObj;
         assertEquals("Boise", propValue.get("City").getComplexValue().get("Name").getValue().toString());
 
         final ClientEntity entity = (ClientEntity)requestBodyAndHeaders("direct:readentitybyid", null, headers);
@@ -393,7 +393,6 @@ public class Olingo4ComponentProducerTest extends AbstractOlingo4TestSupport {
         }
     }
 
-
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
diff --git a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4RouteTest.java b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4RouteTest.java
index 07904e0..bb7f268 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4RouteTest.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4RouteTest.java
@@ -29,7 +29,7 @@ public class Olingo4RouteTest extends CamelTestSupport {
     protected <T> T requestBody(String endpoint, Object body) throws CamelExecutionException {
         return (T)template().requestBody(endpoint, body);
     }
-    
+
     @Test
     public void testRead() throws Exception {
         // Read entity set of the People object
@@ -37,7 +37,7 @@ public class Olingo4RouteTest extends CamelTestSupport {
         assertNotNull(entities);
         assertEquals(20, entities.getEntities().size());
     }
-    
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {