You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/10/08 07:33:33 UTC

[GitHub] [camel-quarkus] zbendhiba opened a new pull request #1888: Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is…

zbendhiba opened a new pull request #1888:
URL: https://github.com/apache/camel-quarkus/pull/1888


   … not provided fixes #1860
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #1888: Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is…

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #1888:
URL: https://github.com/apache/camel-quarkus/pull/1888#discussion_r501538797



##########
File path: integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/Routes.java
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.geocoder.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import io.quarkus.arc.Unremovable;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.geocoder.GeoCoderComponent;
+import org.apache.camel.quarkus.test.mock.backend.MockBackendUtils;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+@ApplicationScoped
+public class Routes extends RouteBuilder {
+
+    @ConfigProperty(name = "google.api.key")
+    String googleApiKey;
+    @ConfigProperty(name = "quarkus.http.test-port")
+    int httpTestPort;
+    @ConfigProperty(name = "quarkus.http.port")
+    int httpPort;
+    @Inject
+    MockApiService mockApiService;
+
+    private String getBaseUri() {
+        final boolean isNativeMode = "executable".equals(System.getProperty("org.graalvm.nativeimage.kind"));
+        return "AIzaFakeKey".equals(googleApiKey)
+                ? "http://localhost:" + (isNativeMode ? httpPort : httpTestPort)
+                : "https://maps.googleapis.com";
+    }
+
+    /**
+     * We need to implement some conditional configuration of the {@link GeoCoderComponent} thus we create it
+     * programmatically and publish via CDI.
+     *
+     * @return a configured {@link GeoCoderComponent}
+     */
+    @Produces
+    @ApplicationScoped
+    @Unremovable
+    @Named("geocoder")
+    GeoCoderComponent geocoderComponent() throws IllegalAccessException, NoSuchFieldException, InstantiationException {
+        final GeoCoderComponent result = new GeoCoderComponent();
+        result.setCamelContext(getContext());
+        result.setGeoApiContext(mockApiService.createGeoApiContext(getBaseUri(), googleApiKey));
+        return result;
+    }
+
+    @Override
+    public void configure() throws Exception {
+        if (MockBackendUtils.startMockBackend(true)) {

Review comment:
       @llowinge will love this!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] zbendhiba commented on a change in pull request #1888: Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is…

Posted by GitBox <gi...@apache.org>.
zbendhiba commented on a change in pull request #1888:
URL: https://github.com/apache/camel-quarkus/pull/1888#discussion_r501538332



##########
File path: extensions/geocoder/deployment/src/main/java/org/apache/camel/quarkus/component/geocoder/deployment/GeocoderProcessor.java
##########
@@ -50,6 +50,7 @@ ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.Bounds"));
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.LatLng"));
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.LocationType"));
+        items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.GeoApiContext$Builder"));

Review comment:
       done !!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] zbendhiba commented on a change in pull request #1888: Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is…

Posted by GitBox <gi...@apache.org>.
zbendhiba commented on a change in pull request #1888:
URL: https://github.com/apache/camel-quarkus/pull/1888#discussion_r501515067



##########
File path: extensions/geocoder/deployment/src/main/java/org/apache/camel/quarkus/component/geocoder/deployment/GeocoderProcessor.java
##########
@@ -50,6 +50,7 @@ ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.Bounds"));
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.LatLng"));
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.LocationType"));
+        items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.GeoApiContext$Builder"));

Review comment:
       yes!! I'll do that !!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #1888: Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is…

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #1888:
URL: https://github.com/apache/camel-quarkus/pull/1888#discussion_r501535956



##########
File path: integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/Routes.java
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.geocoder.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import io.quarkus.arc.Unremovable;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.geocoder.GeoCoderComponent;
+import org.apache.camel.quarkus.test.mock.backend.MockBackendUtils;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+@ApplicationScoped
+public class Routes extends RouteBuilder {
+
+    @ConfigProperty(name = "google.api.key")
+    String googleApiKey;
+    @ConfigProperty(name = "quarkus.http.test-port")
+    int httpTestPort;
+    @ConfigProperty(name = "quarkus.http.port")
+    int httpPort;
+    @Inject
+    MockApiService mockApiService;
+
+    private String getBaseUri() {
+        final boolean isNativeMode = "executable".equals(System.getProperty("org.graalvm.nativeimage.kind"));
+        return "AIzaFakeKey".equals(googleApiKey)
+                ? "http://localhost:" + (isNativeMode ? httpPort : httpTestPort)

Review comment:
       Knowledge sharing: one day this may become easier if Quarkus folks fix https://github.com/quarkusio/quarkus/issues/9287 for us.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] jamesnetherton merged pull request #1888: Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is…

Posted by GitBox <gi...@apache.org>.
jamesnetherton merged pull request #1888:
URL: https://github.com/apache/camel-quarkus/pull/1888


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] jamesnetherton merged pull request #1888: Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is…

Posted by GitBox <gi...@apache.org>.
jamesnetherton merged pull request #1888:
URL: https://github.com/apache/camel-quarkus/pull/1888


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] zbendhiba commented on a change in pull request #1888: Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is…

Posted by GitBox <gi...@apache.org>.
zbendhiba commented on a change in pull request #1888:
URL: https://github.com/apache/camel-quarkus/pull/1888#discussion_r501515067



##########
File path: extensions/geocoder/deployment/src/main/java/org/apache/camel/quarkus/component/geocoder/deployment/GeocoderProcessor.java
##########
@@ -50,6 +50,7 @@ ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.Bounds"));
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.LatLng"));
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.LocationType"));
+        items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.GeoApiContext$Builder"));

Review comment:
       yes!! I'll do that !!

##########
File path: extensions/geocoder/deployment/src/main/java/org/apache/camel/quarkus/component/geocoder/deployment/GeocoderProcessor.java
##########
@@ -50,6 +50,7 @@ ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.Bounds"));
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.LatLng"));
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.LocationType"));
+        items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.GeoApiContext$Builder"));

Review comment:
       done !!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] jamesnetherton commented on a change in pull request #1888: Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is…

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on a change in pull request #1888:
URL: https://github.com/apache/camel-quarkus/pull/1888#discussion_r501511025



##########
File path: extensions/geocoder/deployment/src/main/java/org/apache/camel/quarkus/component/geocoder/deployment/GeocoderProcessor.java
##########
@@ -50,6 +50,7 @@ ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.Bounds"));
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.LatLng"));
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.LocationType"));
+        items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.GeoApiContext$Builder"));

Review comment:
       This is only needed for for the reflection hack in the test, right? I guess it is not necessary for users normal runtime operation?
   
   If so, we can use a configuration property in the test:
   
   ```
   quarkus.camel.native.reflection.include-patterns=com.google.maps.GeoApiContext$Builder
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] jamesnetherton commented on a change in pull request #1888: Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is…

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on a change in pull request #1888:
URL: https://github.com/apache/camel-quarkus/pull/1888#discussion_r501511025



##########
File path: extensions/geocoder/deployment/src/main/java/org/apache/camel/quarkus/component/geocoder/deployment/GeocoderProcessor.java
##########
@@ -50,6 +50,7 @@ ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.Bounds"));
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.LatLng"));
         items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.model.LocationType"));
+        items.add(new ReflectiveClassBuildItem(false, true, "com.google.maps.GeoApiContext$Builder"));

Review comment:
       This is only needed for for the reflection hack in the test, right? I guess it is not necessary for users normal runtime operation?
   
   If so, we can use a configuration property in the test:
   
   ```
   quarkus.camel.native.reflection.include-patterns=com.google.maps.GeoApiContext$Builder
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #1888: Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is…

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #1888:
URL: https://github.com/apache/camel-quarkus/pull/1888#discussion_r501535956



##########
File path: integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/Routes.java
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.geocoder.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import io.quarkus.arc.Unremovable;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.geocoder.GeoCoderComponent;
+import org.apache.camel.quarkus.test.mock.backend.MockBackendUtils;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+@ApplicationScoped
+public class Routes extends RouteBuilder {
+
+    @ConfigProperty(name = "google.api.key")
+    String googleApiKey;
+    @ConfigProperty(name = "quarkus.http.test-port")
+    int httpTestPort;
+    @ConfigProperty(name = "quarkus.http.port")
+    int httpPort;
+    @Inject
+    MockApiService mockApiService;
+
+    private String getBaseUri() {
+        final boolean isNativeMode = "executable".equals(System.getProperty("org.graalvm.nativeimage.kind"));
+        return "AIzaFakeKey".equals(googleApiKey)
+                ? "http://localhost:" + (isNativeMode ? httpPort : httpTestPort)

Review comment:
       Knowledge sharing: one day this may become easier if Quarkus folks fix https://github.com/quarkusio/quarkus/issues/9287 for us.

##########
File path: integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/Routes.java
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.geocoder.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import io.quarkus.arc.Unremovable;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.geocoder.GeoCoderComponent;
+import org.apache.camel.quarkus.test.mock.backend.MockBackendUtils;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+@ApplicationScoped
+public class Routes extends RouteBuilder {
+
+    @ConfigProperty(name = "google.api.key")
+    String googleApiKey;
+    @ConfigProperty(name = "quarkus.http.test-port")
+    int httpTestPort;
+    @ConfigProperty(name = "quarkus.http.port")
+    int httpPort;
+    @Inject
+    MockApiService mockApiService;
+
+    private String getBaseUri() {
+        final boolean isNativeMode = "executable".equals(System.getProperty("org.graalvm.nativeimage.kind"));
+        return "AIzaFakeKey".equals(googleApiKey)
+                ? "http://localhost:" + (isNativeMode ? httpPort : httpTestPort)
+                : "https://maps.googleapis.com";
+    }
+
+    /**
+     * We need to implement some conditional configuration of the {@link GeoCoderComponent} thus we create it
+     * programmatically and publish via CDI.
+     *
+     * @return a configured {@link GeoCoderComponent}
+     */
+    @Produces
+    @ApplicationScoped
+    @Unremovable
+    @Named("geocoder")
+    GeoCoderComponent geocoderComponent() throws IllegalAccessException, NoSuchFieldException, InstantiationException {
+        final GeoCoderComponent result = new GeoCoderComponent();
+        result.setCamelContext(getContext());
+        result.setGeoApiContext(mockApiService.createGeoApiContext(getBaseUri(), googleApiKey));
+        return result;
+    }
+
+    @Override
+    public void configure() throws Exception {
+        if (MockBackendUtils.startMockBackend(true)) {

Review comment:
       @llowinge will love this!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] llowinge commented on a change in pull request #1888: Test Geocoder with Google maps mock API if GOOGLE_GEOCODER_API_KEY is…

Posted by GitBox <gi...@apache.org>.
llowinge commented on a change in pull request #1888:
URL: https://github.com/apache/camel-quarkus/pull/1888#discussion_r501642821



##########
File path: integration-tests/geocoder/src/main/java/org/apache/camel/quarkus/component/geocoder/it/Routes.java
##########
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.geocoder.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import io.quarkus.arc.Unremovable;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.geocoder.GeoCoderComponent;
+import org.apache.camel.quarkus.test.mock.backend.MockBackendUtils;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+@ApplicationScoped
+public class Routes extends RouteBuilder {
+
+    @ConfigProperty(name = "google.api.key")
+    String googleApiKey;
+    @ConfigProperty(name = "quarkus.http.test-port")
+    int httpTestPort;
+    @ConfigProperty(name = "quarkus.http.port")
+    int httpPort;
+    @Inject
+    MockApiService mockApiService;
+
+    private String getBaseUri() {
+        final boolean isNativeMode = "executable".equals(System.getProperty("org.graalvm.nativeimage.kind"));
+        return "AIzaFakeKey".equals(googleApiKey)
+                ? "http://localhost:" + (isNativeMode ? httpPort : httpTestPort)
+                : "https://maps.googleapis.com";
+    }
+
+    /**
+     * We need to implement some conditional configuration of the {@link GeoCoderComponent} thus we create it
+     * programmatically and publish via CDI.
+     *
+     * @return a configured {@link GeoCoderComponent}
+     */
+    @Produces
+    @ApplicationScoped
+    @Unremovable
+    @Named("geocoder")
+    GeoCoderComponent geocoderComponent() throws IllegalAccessException, NoSuchFieldException, InstantiationException {
+        final GeoCoderComponent result = new GeoCoderComponent();
+        result.setCamelContext(getContext());
+        result.setGeoApiContext(mockApiService.createGeoApiContext(getBaseUri(), googleApiKey));
+        return result;
+    }
+
+    @Override
+    public void configure() throws Exception {
+        if (MockBackendUtils.startMockBackend(true)) {

Review comment:
       @ppalaga That is great ! Thanks @zbendhiba for using `MockBackendUtils`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org