You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by al...@apache.org on 2022/08/19 14:36:04 UTC

[camel-quarkus] branch main updated: Fix geocoder test that returned wrong city (#3389)

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

aldettinger pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new 85520c2731 Fix geocoder test that returned wrong city (#3389)
85520c2731 is described below

commit 85520c2731c302b3aeeb4a3342889ca195735d4b
Author: Darren Coleman <dc...@redhat.com>
AuthorDate: Fri Aug 19 10:38:45 2022 +0100

    Fix geocoder test that returned wrong city (#3389)
---
 integration-tests/geocoder/README.adoc             |  18 +
 .../src/main/resources/nominatimReverse.json       |  42 +-
 .../component/geocoder/it/GeocoderGoogleTest.java  |   2 +-
 .../geocoder/it/GeocoderNominationTest.java        |   6 +-
 .../test/resources/__files/mapsApiAddresses.json   | 597 ++++++++-------------
 .../resources/mappings/geocodeGetFromAddress.json  |  12 +-
 .../resources/mappings/geocodeGetFromFile.json     |  14 +-
 .../resources/mappings/geocodeGetFromLatLng.json   |  12 +-
 8 files changed, 281 insertions(+), 422 deletions(-)

diff --git a/integration-tests/geocoder/README.adoc b/integration-tests/geocoder/README.adoc
index 042e686f7c..3f6c648717 100644
--- a/integration-tests/geocoder/README.adoc
+++ b/integration-tests/geocoder/README.adoc
@@ -21,3 +21,21 @@ System property `-Dwiremock.record=true`
 Or
 
 Set environment variable `WIREMOCK_RECORD=true`
+
+Be sure to replace the occurrences of the Google API key in the mappings files with the fake API key "AIzaFakeKey".
+
+The Nominatim tests do not use Wiremock, so the `*.json` files in `src/main/resources` will have to be updated by calling the Nominatim API directly.
+
+If the address look-up has changed, the `nominatimSearch.json` file needs to be updated:
+[source,shell]
+----
+$ curl "https://nominatim.openstreetmap.org/search?q=calle+marie+curie,+sevilla,+sevilla&format=jsonv2&addressdetails=1&limit=1" \
+  | jq > src/main/resources/nominatimSearch.json
+----
+
+If the lat/lon coordinates have changed, the `nominatimReverse.json` file needs to be updated. For example:
+[source,shell]
+----
+$ curl "https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=37.8021028&lon=-122.41875" \
+  | jq > src/main/resources/nominatimReverse.json
+----
diff --git a/integration-tests/geocoder/src/main/resources/nominatimReverse.json b/integration-tests/geocoder/src/main/resources/nominatimReverse.json
index a658369ac6..48eb42db6d 100644
--- a/integration-tests/geocoder/src/main/resources/nominatimReverse.json
+++ b/integration-tests/geocoder/src/main/resources/nominatimReverse.json
@@ -1,32 +1,32 @@
 {
-  "place_id": 169146043,
+  "place_id": 211027368,
   "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
   "osm_type": "way",
-  "osm_id": 279767995,
-  "lat": "40.714128099999996",
-  "lon": "-73.96131110000002",
+  "osm_id": 471737901,
+  "lat": "37.8021028",
+  "lon": "-122.41871601809524",
   "place_rank": 30,
-  "category": "building",
-  "type": "yes",
+  "category": "leisure",
+  "type": "garden",
   "importance": 0,
-  "addresstype": "building",
-  "name": null,
-  "display_name": "281, Bedford Avenue, Brooklyn, Kings County, New York, 11211, United States",
+  "addresstype": "leisure",
+  "name": "Lombard Street",
+  "display_name": "Lombard Street, Russian Hill, San Francisco, California, 90214, United States",
   "address": {
-    "house_number": "281",
-    "road": "Bedford Avenue",
-    "suburb": "Brooklyn",
-    "city_district": "Kings County",
-    "city": "New York",
-    "state": "New York",
-    "postcode": "11211",
+    "leisure": "Lombard Street",
+    "road": "Lombard Street",
+    "neighbourhood": "Russian Hill",
+    "city": "San Francisco",
+    "state": "California",
+    "ISO3166-2-lvl4": "US-CA",
+    "postcode": "90214",
     "country": "United States",
     "country_code": "us"
   },
   "boundingbox": [
-    "40.714064",
-    "40.7141922",
-    "-73.9614164",
-    "-73.9612058"
+    "37.8020421",
+    "37.8021602",
+    "-122.4188041",
+    "-122.4186586"
   ]
-}
\ No newline at end of file
+}
diff --git a/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleTest.java b/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleTest.java
index 3387fafc4e..c96900bab3 100644
--- a/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleTest.java
+++ b/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderGoogleTest.java
@@ -69,7 +69,7 @@ class GeocoderGoogleTest {
 
     @Test
     public void loadLatLong() {
-        RestAssured.get("/lat/40.714224/lon/-73.961452")
+        RestAssured.get("/lat/37.8021028/lon/-122.41875")
                 .then()
                 .statusCode(200)
                 .body("[0]", hasKey("addressComponents"));
diff --git a/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderNominationTest.java b/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderNominationTest.java
index 39e7bb5b82..c3e49d5acf 100644
--- a/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderNominationTest.java
+++ b/integration-tests/geocoder/src/test/java/org/apache/camel/quarkus/component/geocoder/it/GeocoderNominationTest.java
@@ -50,12 +50,12 @@ public class GeocoderNominationTest {
 
     @Test
     public void loadLatLong() {
-        RestAssured.get("/lat/40.714224/lon/-73.961452")
+        RestAssured.get("/lat/37.8021028/lon/-122.41875")
                 .then()
                 .statusCode(200)
                 .body("status", equalTo("OK"))
-                .body("postalCode", equalTo("11211"))
-                .body("city", equalTo("New York"))
+                .body("postalCode", equalTo("90214"))
+                .body("city", equalTo("San Francisco"))
                 .body("country.shortCode", equalTo("US"));
     }
 }
diff --git a/integration-tests/geocoder/src/test/resources/__files/mapsApiAddresses.json b/integration-tests/geocoder/src/test/resources/__files/mapsApiAddresses.json
index 8a3c552137..d86d7949a4 100644
--- a/integration-tests/geocoder/src/test/resources/__files/mapsApiAddresses.json
+++ b/integration-tests/geocoder/src/test/resources/__files/mapsApiAddresses.json
@@ -1,39 +1,39 @@
 {
    "plus_code" : {
-      "compound_code" : "P27Q+MC New York, NY, USA",
-      "global_code" : "87G8P27Q+MC"
+      "compound_code" : "RH2J+RGR Russian Hill, San Francisco, CA, USA",
+      "global_code" : "849VRH2J+RGR"
    },
    "results" : [
       {
          "address_components" : [
             {
-               "long_name" : "277",
-               "short_name" : "277",
+               "long_name" : "1037",
+               "short_name" : "1037",
                "types" : [ "street_number" ]
             },
             {
-               "long_name" : "Bedford Avenue",
-               "short_name" : "Bedford Ave",
+               "long_name" : "Lombard Street",
+               "short_name" : "Lombard St",
                "types" : [ "route" ]
             },
             {
-               "long_name" : "Williamsburg",
-               "short_name" : "Williamsburg",
+               "long_name" : "Russian Hill",
+               "short_name" : "Russian Hill",
                "types" : [ "neighborhood", "political" ]
             },
             {
-               "long_name" : "Brooklyn",
-               "short_name" : "Brooklyn",
-               "types" : [ "political", "sublocality", "sublocality_level_1" ]
+               "long_name" : "San Francisco",
+               "short_name" : "SF",
+               "types" : [ "locality", "political" ]
             },
             {
-               "long_name" : "Kings County",
-               "short_name" : "Kings County",
+               "long_name" : "San Francisco County",
+               "short_name" : "San Francisco County",
                "types" : [ "administrative_area_level_2", "political" ]
             },
             {
-               "long_name" : "New York",
-               "short_name" : "NY",
+               "long_name" : "California",
+               "short_name" : "CA",
                "types" : [ "administrative_area_level_1", "political" ]
             },
             {
@@ -42,66 +42,71 @@
                "types" : [ "country", "political" ]
             },
             {
-               "long_name" : "11211",
-               "short_name" : "11211",
+               "long_name" : "94109",
+               "short_name" : "94109",
                "types" : [ "postal_code" ]
+            },
+            {
+               "long_name" : "1514",
+               "short_name" : "1514",
+               "types" : [ "postal_code_suffix" ]
             }
          ],
-         "formatted_address" : "277 Bedford Ave, Brooklyn, NY 11211, USA",
+         "formatted_address" : "1037 Lombard St, San Francisco, CA 94109, USA",
          "geometry" : {
             "location" : {
-               "lat" : 40.7142205,
-               "lng" : -73.9612903
+               "lat" : 37.8020935,
+               "lng" : -122.4187088
             },
             "location_type" : "ROOFTOP",
             "viewport" : {
                "northeast" : {
-                  "lat" : 40.71556948029149,
-                  "lng" : -73.95994131970849
+                  "lat" : 37.80344248029149,
+                  "lng" : -122.4173598197085
                },
                "southwest" : {
-                  "lat" : 40.7128715197085,
-                  "lng" : -73.9626392802915
+                  "lat" : 37.8007445197085,
+                  "lng" : -122.4200577802915
                }
             }
          },
-         "place_id" : "ChIJd8BlQ2BZwokRAFUEcm_qrcA",
+         "place_id" : "ChIJIdVMC-aAhYAR3-qzr2F0oxE",
          "plus_code" : {
-            "compound_code" : "P27Q+MF New York, NY, USA",
-            "global_code" : "87G8P27Q+MF"
+            "compound_code" : "RH2J+RG Russian Hill, San Francisco, CA, USA",
+            "global_code" : "849VRH2J+RG"
          },
          "types" : [ "street_address" ]
       },
       {
          "address_components" : [
             {
-               "long_name" : "279",
-               "short_name" : "279",
+               "long_name" : "1033",
+               "short_name" : "1033",
                "types" : [ "street_number" ]
             },
             {
-               "long_name" : "Bedford Avenue",
-               "short_name" : "Bedford Ave",
+               "long_name" : "Lombard Street",
+               "short_name" : "Lombard St",
                "types" : [ "route" ]
             },
             {
-               "long_name" : "Williamsburg",
-               "short_name" : "Williamsburg",
+               "long_name" : "Russian Hill",
+               "short_name" : "Russian Hill",
                "types" : [ "neighborhood", "political" ]
             },
             {
-               "long_name" : "Brooklyn",
-               "short_name" : "Brooklyn",
-               "types" : [ "political", "sublocality", "sublocality_level_1" ]
+               "long_name" : "San Francisco",
+               "short_name" : "SF",
+               "types" : [ "locality", "political" ]
             },
             {
-               "long_name" : "Kings County",
-               "short_name" : "Kings County",
+               "long_name" : "San Francisco County",
+               "short_name" : "San Francisco County",
                "types" : [ "administrative_area_level_2", "political" ]
             },
             {
-               "long_name" : "New York",
-               "short_name" : "NY",
+               "long_name" : "California",
+               "short_name" : "CA",
                "types" : [ "administrative_area_level_1", "political" ]
             },
             {
@@ -110,77 +115,77 @@
                "types" : [ "country", "political" ]
             },
             {
-               "long_name" : "11211",
-               "short_name" : "11211",
+               "long_name" : "94109",
+               "short_name" : "94109",
                "types" : [ "postal_code" ]
             },
             {
-               "long_name" : "4203",
-               "short_name" : "4203",
+               "long_name" : "1514",
+               "short_name" : "1514",
                "types" : [ "postal_code_suffix" ]
             }
          ],
-         "formatted_address" : "279 Bedford Ave, Brooklyn, NY 11211, USA",
+         "formatted_address" : "1033 Lombard St, San Francisco, CA 94109, USA",
          "geometry" : {
             "bounds" : {
                "northeast" : {
-                  "lat" : 40.7142628,
-                  "lng" : -73.96121309999999
+                  "lat" : 37.8020539,
+                  "lng" : -122.4185389
                },
                "southwest" : {
-                  "lat" : 40.7141534,
-                  "lng" : -73.9613792
+                  "lat" : 37.801908,
+                  "lng" : -122.4186779
                }
             },
             "location" : {
-               "lat" : 40.7142015,
-               "lng" : -73.96130769999999
+               "lat" : 37.801994,
+               "lng" : -122.4186099
             },
             "location_type" : "ROOFTOP",
             "viewport" : {
                "northeast" : {
-                  "lat" : 40.7155570802915,
-                  "lng" : -73.95994716970849
+                  "lat" : 37.8033299302915,
+                  "lng" : -122.4172594197085
                },
                "southwest" : {
-                  "lat" : 40.7128591197085,
-                  "lng" : -73.96264513029149
+                  "lat" : 37.8006319697085,
+                  "lng" : -122.4199573802915
                }
             }
          },
-         "place_id" : "ChIJRYYERGBZwokRAM4n1GlcYX4",
+         "place_id" : "ChIJvdcNC-aAhYARk3y6CuDhTmI",
          "types" : [ "premise" ]
       },
       {
          "address_components" : [
             {
-               "long_name" : "279",
-               "short_name" : "279",
+               "long_name" : "1065-1037",
+               "short_name" : "1065-1037",
                "types" : [ "street_number" ]
             },
             {
-               "long_name" : "Bedford Avenue",
-               "short_name" : "Bedford Ave",
+               "long_name" : "Lombard Street",
+               "short_name" : "Lombard St",
                "types" : [ "route" ]
             },
             {
-               "long_name" : "Williamsburg",
-               "short_name" : "Williamsburg",
+               "long_name" : "Russian Hill",
+               "short_name" : "Russian Hill",
                "types" : [ "neighborhood", "political" ]
             },
             {
-               "long_name" : "Brooklyn",
-               "short_name" : "Brooklyn",
-               "types" : [ "political", "sublocality", "sublocality_level_1" ]
+               "long_name" : "San Francisco",
+               "short_name" : "SF",
+               "types" : [ "locality", "political" ]
             },
             {
-               "long_name" : "Kings County",
-               "short_name" : "Kings County",
+               "long_name" : "San Francisco County",
+               "short_name" : "San Francisco County",
                "types" : [ "administrative_area_level_2", "political" ]
             },
             {
-               "long_name" : "New York",
-               "short_name" : "NY",
+               "long_name" : "California",
+               "short_name" : "CA",
                "types" : [ "administrative_area_level_1", "political" ]
             },
             {
@@ -189,137 +194,72 @@
                "types" : [ "country", "political" ]
             },
             {
-               "long_name" : "11211",
-               "short_name" : "11211",
+               "long_name" : "94109",
+               "short_name" : "94109",
                "types" : [ "postal_code" ]
-            }
-         ],
-         "formatted_address" : "279 Bedford Ave, Brooklyn, NY 11211, USA",
-         "geometry" : {
-            "location" : {
-               "lat" : 40.7142077,
-               "lng" : -73.96131149999999
-            },
-            "location_type" : "ROOFTOP",
-            "viewport" : {
-               "northeast" : {
-                  "lat" : 40.7155566802915,
-                  "lng" : -73.9599625197085
-               },
-               "southwest" : {
-                  "lat" : 40.7128587197085,
-                  "lng" : -73.9626604802915
-               }
-            }
-         },
-         "place_id" : "ChIJT2x8Q2BZwokRpBu2jUzX3dE",
-         "plus_code" : {
-            "compound_code" : "P27Q+MF New York, NY, USA",
-            "global_code" : "87G8P27Q+MF"
-         },
-         "types" : [
-            "bakery",
-            "cafe",
-            "establishment",
-            "food",
-            "point_of_interest",
-            "store"
-         ]
-      },
-      {
-         "address_components" : [
-            {
-               "long_name" : "291-275",
-               "short_name" : "291-275",
-               "types" : [ "street_number" ]
-            },
-            {
-               "long_name" : "Bedford Avenue",
-               "short_name" : "Bedford Ave",
-               "types" : [ "route" ]
-            },
-            {
-               "long_name" : "Williamsburg",
-               "short_name" : "Williamsburg",
-               "types" : [ "neighborhood", "political" ]
-            },
-            {
-               "long_name" : "Brooklyn",
-               "short_name" : "Brooklyn",
-               "types" : [ "political", "sublocality", "sublocality_level_1" ]
             },
             {
-               "long_name" : "Kings County",
-               "short_name" : "Kings County",
-               "types" : [ "administrative_area_level_2", "political" ]
-            },
-            {
-               "long_name" : "New York",
-               "short_name" : "NY",
-               "types" : [ "administrative_area_level_1", "political" ]
-            },
-            {
-               "long_name" : "United States",
-               "short_name" : "US",
-               "types" : [ "country", "political" ]
-            },
-            {
-               "long_name" : "11211",
-               "short_name" : "11211",
-               "types" : [ "postal_code" ]
+               "long_name" : "1514",
+               "short_name" : "1514",
+               "types" : [ "postal_code_suffix" ]
             }
          ],
-         "formatted_address" : "291-275 Bedford Ave, Brooklyn, NY 11211, USA",
+         "formatted_address" : "1065-1037 Lombard St, San Francisco, CA 94109, USA",
          "geometry" : {
             "bounds" : {
                "northeast" : {
-                  "lat" : 40.7145065,
-                  "lng" : -73.9612923
+                  "lat" : 37.8021879,
+                  "lng" : -122.4187179
                },
                "southwest" : {
-                  "lat" : 40.7139055,
-                  "lng" : -73.96168349999999
+                  "lat" : 37.80204440000001,
+                  "lng" : -122.4188674
                }
             },
             "location" : {
-               "lat" : 40.7142045,
-               "lng" : -73.9614845
+               "lat" : 37.8021185,
+               "lng" : -122.4187926
             },
             "location_type" : "GEOMETRIC_CENTER",
             "viewport" : {
                "northeast" : {
-                  "lat" : 40.7155549802915,
-                  "lng" : -73.96013891970848
+                  "lat" : 37.80346513029151,
+                  "lng" : -122.4174436697085
                },
                "southwest" : {
-                  "lat" : 40.7128570197085,
-                  "lng" : -73.96283688029149
+                  "lat" : 37.80076716970851,
+                  "lng" : -122.4201416302915
                }
             }
          },
-         "place_id" : "ChIJ8ThWRGBZwokR3E1zUisk3LU",
+         "place_id" : "ChIJ_XFbc-aAhYARZES_43dJ1mk",
          "types" : [ "route" ]
       },
       {
          "address_components" : [
             {
-               "long_name" : "South Williamsburg",
-               "short_name" : "South Williamsburg",
+               "long_name" : "RH2J+RG",
+               "short_name" : "RH2J+RG",
+               "types" : [ "plus_code" ]
+            },
+            {
+               "long_name" : "Russian Hill",
+               "short_name" : "Russian Hill",
                "types" : [ "neighborhood", "political" ]
             },
             {
-               "long_name" : "Brooklyn",
-               "short_name" : "Brooklyn",
-               "types" : [ "political", "sublocality", "sublocality_level_1" ]
+               "long_name" : "San Francisco",
+               "short_name" : "SF",
+               "types" : [ "locality", "political" ]
             },
             {
-               "long_name" : "Kings County",
-               "short_name" : "Kings County",
+               "long_name" : "San Francisco County",
+               "short_name" : "San Francisco County",
                "types" : [ "administrative_area_level_2", "political" ]
             },
             {
-               "long_name" : "New York",
-               "short_name" : "NY",
+               "long_name" : "California",
+               "short_name" : "CA",
                "types" : [ "administrative_area_level_1", "political" ]
             },
             {
@@ -328,116 +268,61 @@
                "types" : [ "country", "political" ]
             }
          ],
-         "formatted_address" : "South Williamsburg, Brooklyn, NY, USA",
+         "formatted_address" : "RH2J+RG Russian Hill, San Francisco, CA, USA",
          "geometry" : {
             "bounds" : {
                "northeast" : {
-                  "lat" : 40.7167119,
-                  "lng" : -73.9420904
+                  "lat" : 37.802125,
+                  "lng" : -122.418625
                },
                "southwest" : {
-                  "lat" : 40.6984866,
-                  "lng" : -73.9699432
+                  "lat" : 37.802,
+                  "lng" : -122.41875
                }
             },
             "location" : {
-               "lat" : 40.7043921,
-               "lng" : -73.9565551
+               "lat" : 37.8021028,
+               "lng" : -122.41875
             },
-            "location_type" : "APPROXIMATE",
+            "location_type" : "GEOMETRIC_CENTER",
             "viewport" : {
                "northeast" : {
-                  "lat" : 40.7167119,
-                  "lng" : -73.9420904
+                  "lat" : 37.80341148029149,
+                  "lng" : -122.4173385197085
                },
                "southwest" : {
-                  "lat" : 40.6984866,
-                  "lng" : -73.9699432
+                  "lat" : 37.80071351970849,
+                  "lng" : -122.4200364802915
                }
             }
          },
-         "place_id" : "ChIJR3_ODdlbwokRYtN19kNtcuk",
-         "types" : [ "neighborhood", "political" ]
-      },
-      {
-         "address_components" : [
-            {
-               "long_name" : "11211",
-               "short_name" : "11211",
-               "types" : [ "postal_code" ]
-            },
-            {
-               "long_name" : "Brooklyn",
-               "short_name" : "Brooklyn",
-               "types" : [ "political", "sublocality", "sublocality_level_1" ]
-            },
-            {
-               "long_name" : "New York",
-               "short_name" : "New York",
-               "types" : [ "locality", "political" ]
-            },
-            {
-               "long_name" : "New York",
-               "short_name" : "NY",
-               "types" : [ "administrative_area_level_1", "political" ]
-            },
-            {
-               "long_name" : "United States",
-               "short_name" : "US",
-               "types" : [ "country", "political" ]
-            }
-         ],
-         "formatted_address" : "Brooklyn, NY 11211, USA",
-         "geometry" : {
-            "bounds" : {
-               "northeast" : {
-                  "lat" : 40.7280089,
-                  "lng" : -73.9207299
-               },
-               "southwest" : {
-                  "lat" : 40.7008331,
-                  "lng" : -73.9644697
-               }
-            },
-            "location" : {
-               "lat" : 40.7093358,
-               "lng" : -73.9565551
-            },
-            "location_type" : "APPROXIMATE",
-            "viewport" : {
-               "northeast" : {
-                  "lat" : 40.7280089,
-                  "lng" : -73.9207299
-               },
-               "southwest" : {
-                  "lat" : 40.7008331,
-                  "lng" : -73.9644697
-               }
-            }
+         "place_id" : "GhIJ2AP3TavmQkARzMzMzMyaXsA",
+         "plus_code" : {
+            "compound_code" : "RH2J+RG Russian Hill, San Francisco, CA, USA",
+            "global_code" : "849VRH2J+RG"
          },
-         "place_id" : "ChIJvbEjlVdZwokR4KapM3WCFRw",
-         "types" : [ "postal_code" ]
+         "types" : [ "plus_code" ]
       },
       {
          "address_components" : [
             {
-               "long_name" : "Williamsburg",
-               "short_name" : "Williamsburg",
+               "long_name" : "Russian Hill",
+               "short_name" : "Russian Hill",
                "types" : [ "neighborhood", "political" ]
             },
             {
-               "long_name" : "Brooklyn",
-               "short_name" : "Brooklyn",
-               "types" : [ "political", "sublocality", "sublocality_level_1" ]
+               "long_name" : "San Francisco",
+               "short_name" : "SF",
+               "types" : [ "locality", "political" ]
             },
             {
-               "long_name" : "Kings County",
-               "short_name" : "Kings County",
+               "long_name" : "San Francisco County",
+               "short_name" : "San Francisco County",
                "types" : [ "administrative_area_level_2", "political" ]
             },
             {
-               "long_name" : "New York",
-               "short_name" : "NY",
+               "long_name" : "California",
+               "short_name" : "CA",
                "types" : [ "administrative_area_level_1", "political" ]
             },
             {
@@ -446,106 +331,57 @@
                "types" : [ "country", "political" ]
             }
          ],
-         "formatted_address" : "Williamsburg, Brooklyn, NY, USA",
+         "formatted_address" : "Russian Hill, San Francisco, CA, USA",
          "geometry" : {
             "bounds" : {
                "northeast" : {
-                  "lat" : 40.7251773,
-                  "lng" : -73.936498
+                  "lat" : 37.8051696,
+                  "lng" : -122.4100758
                },
                "southwest" : {
-                  "lat" : 40.6979329,
-                  "lng" : -73.96984499999999
+                  "lat" : 37.7956699,
+                  "lng" : -122.4251094
                }
             },
             "location" : {
-               "lat" : 40.7081156,
-               "lng" : -73.9570696
+               "lat" : 37.8001413,
+               "lng" : -122.4192681
             },
             "location_type" : "APPROXIMATE",
             "viewport" : {
                "northeast" : {
-                  "lat" : 40.7251773,
-                  "lng" : -73.936498
+                  "lat" : 37.8051696,
+                  "lng" : -122.4100758
                },
                "southwest" : {
-                  "lat" : 40.6979329,
-                  "lng" : -73.96984499999999
+                  "lat" : 37.7956699,
+                  "lng" : -122.4251094
                }
             }
          },
-         "place_id" : "ChIJQSrBBv1bwokRbNfFHCnyeYI",
+         "place_id" : "ChIJdZaCGuaAhYARxWlcNTgaA-c",
          "types" : [ "neighborhood", "political" ]
       },
       {
          "address_components" : [
             {
-               "long_name" : "Brooklyn",
-               "short_name" : "Brooklyn",
-               "types" : [ "political", "sublocality", "sublocality_level_1" ]
-            },
-            {
-               "long_name" : "Kings County",
-               "short_name" : "Kings County",
-               "types" : [ "administrative_area_level_2", "political" ]
-            },
-            {
-               "long_name" : "New York",
-               "short_name" : "NY",
-               "types" : [ "administrative_area_level_1", "political" ]
+               "long_name" : "94109",
+               "short_name" : "94109",
+               "types" : [ "postal_code" ]
             },
             {
-               "long_name" : "United States",
-               "short_name" : "US",
-               "types" : [ "country", "political" ]
-            }
-         ],
-         "formatted_address" : "Brooklyn, NY, USA",
-         "geometry" : {
-            "bounds" : {
-               "northeast" : {
-                  "lat" : 40.739446,
-                  "lng" : -73.83336509999999
-               },
-               "southwest" : {
-                  "lat" : 40.551042,
-                  "lng" : -74.05663
-               }
-            },
-            "location" : {
-               "lat" : 40.6781784,
-               "lng" : -73.94415789999999
+               "long_name" : "San Francisco",
+               "short_name" : "SF",
+               "types" : [ "locality", "political" ]
             },
-            "location_type" : "APPROXIMATE",
-            "viewport" : {
-               "northeast" : {
-                  "lat" : 40.739446,
-                  "lng" : -73.83336509999999
-               },
-               "southwest" : {
-                  "lat" : 40.551042,
-                  "lng" : -74.05663
-               }
-            }
-         },
-         "place_id" : "ChIJCSF8lBZEwokRhngABHRcdoI",
-         "types" : [ "political", "sublocality", "sublocality_level_1" ]
-      },
-      {
-         "address_components" : [
             {
-               "long_name" : "Kings County",
-               "short_name" : "Kings County",
+               "long_name" : "San Francisco County",
+               "short_name" : "San Francisco County",
                "types" : [ "administrative_area_level_2", "political" ]
             },
             {
-               "long_name" : "Brooklyn",
-               "short_name" : "Brooklyn",
-               "types" : [ "political", "sublocality", "sublocality_level_1" ]
-            },
-            {
-               "long_name" : "New York",
-               "short_name" : "NY",
+               "long_name" : "California",
+               "short_name" : "CA",
                "types" : [ "administrative_area_level_1", "political" ]
             },
             {
@@ -554,47 +390,52 @@
                "types" : [ "country", "political" ]
             }
          ],
-         "formatted_address" : "Kings County, Brooklyn, NY, USA",
+         "formatted_address" : "San Francisco, CA 94109, USA",
          "geometry" : {
             "bounds" : {
                "northeast" : {
-                  "lat" : 40.739446,
-                  "lng" : -73.83336509999999
+                  "lat" : 37.8128889,
+                  "lng" : -122.411699
                },
                "southwest" : {
-                  "lat" : 40.551042,
-                  "lng" : -74.05663
+                  "lat" : 37.7811169,
+                  "lng" : -122.4326081
                }
             },
             "location" : {
-               "lat" : 40.6528762,
-               "lng" : -73.95949399999999
+               "lat" : 37.7929789,
+               "lng" : -122.4212424
             },
             "location_type" : "APPROXIMATE",
             "viewport" : {
                "northeast" : {
-                  "lat" : 40.739446,
-                  "lng" : -73.83336509999999
+                  "lat" : 37.8128889,
+                  "lng" : -122.411699
                },
                "southwest" : {
-                  "lat" : 40.551042,
-                  "lng" : -74.05663
+                  "lat" : 37.7811169,
+                  "lng" : -122.4326081
                }
             }
          },
-         "place_id" : "ChIJOwE7_GTtwokRs75rhW4_I6M",
-         "types" : [ "administrative_area_level_2", "political" ]
+         "place_id" : "ChIJy0ilcOmAhYARCLOo6oZQNxk",
+         "types" : [ "postal_code" ]
       },
       {
          "address_components" : [
             {
-               "long_name" : "New York",
-               "short_name" : "New York",
+               "long_name" : "San Francisco",
+               "short_name" : "SF",
                "types" : [ "locality", "political" ]
             },
             {
-               "long_name" : "New York",
-               "short_name" : "NY",
+               "long_name" : "San Francisco County",
+               "short_name" : "San Francisco County",
+               "types" : [ "administrative_area_level_2", "political" ]
+            },
+            {
+               "long_name" : "California",
+               "short_name" : "CA",
                "types" : [ "administrative_area_level_1", "political" ]
             },
             {
@@ -603,47 +444,47 @@
                "types" : [ "country", "political" ]
             }
          ],
-         "formatted_address" : "New York, NY, USA",
+         "formatted_address" : "San Francisco, CA, USA",
          "geometry" : {
             "bounds" : {
                "northeast" : {
-                  "lat" : 40.9175771,
-                  "lng" : -73.70027209999999
+                  "lat" : 37.9298239,
+                  "lng" : -122.28178
                },
                "southwest" : {
-                  "lat" : 40.4773991,
-                  "lng" : -74.25908989999999
+                  "lat" : 37.6398299,
+                  "lng" : -123.173825
                }
             },
             "location" : {
-               "lat" : 40.7127753,
-               "lng" : -74.0059728
+               "lat" : 37.7749295,
+               "lng" : -122.4194155
             },
             "location_type" : "APPROXIMATE",
             "viewport" : {
                "northeast" : {
-                  "lat" : 40.9175771,
-                  "lng" : -73.70027209999999
+                  "lat" : 37.9298239,
+                  "lng" : -122.28178
                },
                "southwest" : {
-                  "lat" : 40.4773991,
-                  "lng" : -74.25908989999999
+                  "lat" : 37.6398299,
+                  "lng" : -123.173825
                }
             }
          },
-         "place_id" : "ChIJOwg_06VPwokRYv534QaPC8g",
+         "place_id" : "ChIJIQBpAG2ahYAR_6128GcTUEo",
          "types" : [ "locality", "political" ]
       },
       {
          "address_components" : [
             {
-               "long_name" : "Long Island",
-               "short_name" : "Long Island",
-               "types" : [ "establishment", "natural_feature" ]
+               "long_name" : "San Francisco County",
+               "short_name" : "San Francisco County",
+               "types" : [ "administrative_area_level_2", "political" ]
             },
             {
-               "long_name" : "New York",
-               "short_name" : "NY",
+               "long_name" : "California",
+               "short_name" : "CA",
                "types" : [ "administrative_area_level_1", "political" ]
             },
             {
@@ -652,42 +493,42 @@
                "types" : [ "country", "political" ]
             }
          ],
-         "formatted_address" : "Long Island, New York, USA",
+         "formatted_address" : "San Francisco County, CA, USA",
          "geometry" : {
             "bounds" : {
                "northeast" : {
-                  "lat" : 41.1612401,
-                  "lng" : -71.85620109999999
+                  "lat" : 37.9298239,
+                  "lng" : -122.28178
                },
                "southwest" : {
-                  "lat" : 40.5429789,
-                  "lng" : -74.0419497
+                  "lat" : 37.6398299,
+                  "lng" : -123.173825
                }
             },
             "location" : {
-               "lat" : 40.789142,
-               "lng" : -73.13496099999999
+               "lat" : 37.7749073,
+               "lng" : -122.4193878
             },
             "location_type" : "APPROXIMATE",
             "viewport" : {
                "northeast" : {
-                  "lat" : 41.1612401,
-                  "lng" : -71.85620109999999
+                  "lat" : 37.9298239,
+                  "lng" : -122.28178
                },
                "southwest" : {
-                  "lat" : 40.5429789,
-                  "lng" : -74.0419497
+                  "lat" : 37.6398299,
+                  "lng" : -123.173825
                }
             }
          },
-         "place_id" : "ChIJy6Xu4VRE6IkRGA2UhmH59x0",
-         "types" : [ "establishment", "natural_feature" ]
+         "place_id" : "ChIJIQBpAG2ahYARUksNqd0_1h8",
+         "types" : [ "administrative_area_level_2", "political" ]
       },
       {
          "address_components" : [
             {
-               "long_name" : "New York",
-               "short_name" : "NY",
+               "long_name" : "California",
+               "short_name" : "CA",
                "types" : [ "administrative_area_level_1", "political" ]
             },
             {
@@ -696,35 +537,35 @@
                "types" : [ "country", "political" ]
             }
          ],
-         "formatted_address" : "New York, USA",
+         "formatted_address" : "California, USA",
          "geometry" : {
             "bounds" : {
                "northeast" : {
-                  "lat" : 45.015861,
-                  "lng" : -71.777491
+                  "lat" : 42.0095169,
+                  "lng" : -114.131211
                },
                "southwest" : {
-                  "lat" : 40.4773991,
-                  "lng" : -79.7625901
+                  "lat" : 32.528832,
+                  "lng" : -124.482003
                }
             },
             "location" : {
-               "lat" : 43.2994285,
-               "lng" : -74.21793260000001
+               "lat" : 36.778261,
+               "lng" : -119.4179324
             },
             "location_type" : "APPROXIMATE",
             "viewport" : {
                "northeast" : {
-                  "lat" : 45.015861,
-                  "lng" : -71.777491
+                  "lat" : 42.0095169,
+                  "lng" : -114.131211
                },
                "southwest" : {
-                  "lat" : 40.4773991,
-                  "lng" : -79.7625901
+                  "lat" : 32.528832,
+                  "lng" : -124.482003
                }
             }
          },
-         "place_id" : "ChIJqaUj8fBLzEwRZ5UY3sHGz90",
+         "place_id" : "ChIJPV4oX_65j4ARVW8IJ6IJUYs",
          "types" : [ "administrative_area_level_1", "political" ]
       },
       {
diff --git a/integration-tests/geocoder/src/test/resources/mappings/geocodeGetFromAddress.json b/integration-tests/geocoder/src/test/resources/mappings/geocodeGetFromAddress.json
index 4881c65082..8d81cc728a 100644
--- a/integration-tests/geocoder/src/test/resources/mappings/geocodeGetFromAddress.json
+++ b/integration-tests/geocoder/src/test/resources/mappings/geocodeGetFromAddress.json
@@ -1,5 +1,5 @@
 {
-  "id" : "09aa79df-8a19-41df-8655-e414d390d6eb",
+  "id" : "53546caa-453a-4b55-b0bc-0a47d49bdae3",
   "name" : "maps_api_geocode_json",
   "request" : {
     "url" : "/maps/api/geocode/json?key=AIzaFakeKey&address=calle+marie+curie%2C+sevilla%2C+sevilla",
@@ -7,10 +7,10 @@
   },
   "response" : {
     "status" : 200,
-    "body" : "{\n   \"results\" : [\n      {\n         \"address_components\" : [\n            {\n               \"long_name\" : \"Calle Marie Curie\",\n               \"short_name\" : \"Calle Marie Curie\",\n               \"types\" : [ \"route\" ]\n            },\n            {\n               \"long_name\" : \"Sevilla\",\n               \"short_name\" : \"Sevilla\",\n               \"types\" : [ \"locality\", \"political\" ]\n            },\n            {\n               \"long_name\" [...]
+    "body" : "{\n   \"results\" : [\n      {\n         \"address_components\" : [\n            {\n               \"long_name\" : \"Calle Marie Curie\",\n               \"short_name\" : \"C. Marie Curie\",\n               \"types\" : [ \"route\" ]\n            },\n            {\n               \"long_name\" : \"Sevilla\",\n               \"short_name\" : \"Sevilla\",\n               \"types\" : [ \"locality\", \"political\" ]\n            },\n            {\n               \"long_name\" :  [...]
     "headers" : {
       "Content-Type" : "application/json; charset=UTF-8",
-      "Date" : "Tue, 03 Nov 2020 09:39:11 GMT",
+      "Date" : "Fri, 19 Aug 2022 08:22:03 GMT",
       "Pragma" : "no-cache",
       "Expires" : "Fri, 01 Jan 1990 00:00:00 GMT",
       "Cache-Control" : "no-cache, must-revalidate",
@@ -18,11 +18,11 @@
       "Server" : "mafe",
       "X-XSS-Protection" : "0",
       "X-Frame-Options" : "SAMEORIGIN",
-      "Server-Timing" : "gfet4t7; dur=263",
-      "Alt-Svc" : "h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
+      "Server-Timing" : "gfet4t7; dur=112",
+      "Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
     }
   },
-  "uuid" : "09aa79df-8a19-41df-8655-e414d390d6eb",
+  "uuid" : "53546caa-453a-4b55-b0bc-0a47d49bdae3",
   "persistent" : true,
   "insertionIndex" : 2
 }
\ No newline at end of file
diff --git a/integration-tests/geocoder/src/test/resources/mappings/geocodeGetFromFile.json b/integration-tests/geocoder/src/test/resources/mappings/geocodeGetFromFile.json
index 383e19f592..8058dcf502 100644
--- a/integration-tests/geocoder/src/test/resources/mappings/geocodeGetFromFile.json
+++ b/integration-tests/geocoder/src/test/resources/mappings/geocodeGetFromFile.json
@@ -1,8 +1,8 @@
 {
-  "id" : "01626380-6d65-4cdb-8080-4e7b8c3565e4",
+  "id" : "fb610d4f-8602-4d6e-8c74-0e4fcfb1041c",
   "name" : "maps_api_geocode_json",
   "request" : {
-    "url" : "/maps/api/geocode/json?key=AIzaFakeKey&latlng=40.71422400%2C-73.96145200",
+    "url" : "/maps/api/geocode/json?key=AIzaFakeKey&latlng=37.80210280%2C-122.41875000",
     "method" : "GET"
   },
   "response" : {
@@ -10,20 +10,20 @@
     "bodyFileName" : "mapsApiAddresses.json",
     "headers" : {
       "Content-Type" : "application/json; charset=UTF-8",
-      "Date" : "Tue, 03 Nov 2020 09:39:12 GMT",
+      "Date" : "Fri, 19 Aug 2022 08:22:04 GMT",
       "Pragma" : "no-cache",
       "Expires" : "Fri, 01 Jan 1990 00:00:00 GMT",
       "Cache-Control" : "no-cache, must-revalidate",
       "Vary" : "Accept-Language",
-      "X-Goog-Maps-Metro-Area" : "New York, NY",
+      "X-Goog-Maps-Metro-Area" : "San Francisco, CA",
       "Server" : "mafe",
       "X-XSS-Protection" : "0",
       "X-Frame-Options" : "SAMEORIGIN",
-      "Server-Timing" : "gfet4t7; dur=44",
-      "Alt-Svc" : "h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
+      "Server-Timing" : "gfet4t7; dur=94",
+      "Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
     }
   },
-  "uuid" : "01626380-6d65-4cdb-8080-4e7b8c3565e4",
+  "uuid" : "fb610d4f-8602-4d6e-8c74-0e4fcfb1041c",
   "persistent" : true,
   "insertionIndex" : 3
 }
\ No newline at end of file
diff --git a/integration-tests/geocoder/src/test/resources/mappings/geocodeGetFromLatLng.json b/integration-tests/geocoder/src/test/resources/mappings/geocodeGetFromLatLng.json
index 3f9e959f34..0580a63804 100644
--- a/integration-tests/geocoder/src/test/resources/mappings/geocodeGetFromLatLng.json
+++ b/integration-tests/geocoder/src/test/resources/mappings/geocodeGetFromLatLng.json
@@ -1,5 +1,5 @@
 {
-  "id" : "93b092b6-d2d4-485c-b9a8-a1e4625e343a",
+  "id" : "d110a55b-70f9-4d24-bb63-53ca9fd2e95e",
   "name" : "maps_api_geocode_json",
   "request" : {
     "url" : "/maps/api/geocode/json?key=AIzaFakeKey&latlng=24.77684040%2C-76.28490470",
@@ -7,10 +7,10 @@
   },
   "response" : {
     "status" : 200,
-    "body" : "{\n   \"plus_code\" : {\n      \"compound_code\" : \"QPG8+P2 Freetown, The Bahamas\",\n      \"global_code\" : \"77P5QPG8+P2\"\n   },\n   \"results\" : [\n      {\n         \"address_components\" : [\n            {\n               \"long_name\" : \"Unnamed Road\",\n               \"short_name\" : \"Unnamed Road\",\n               \"types\" : [ \"route\" ]\n            },\n            {\n               \"long_name\" : \"Freetown\",\n               \"short_name\" : \"Freetown [...]
+    "body" : "{\n   \"plus_code\" : {\n      \"compound_code\" : \"QPG8+P2Q Freetown, The Bahamas\",\n      \"global_code\" : \"77P5QPG8+P2Q\"\n   },\n   \"results\" : [\n      {\n         \"address_components\" : [\n            {\n               \"long_name\" : \"QPG8+P2\",\n               \"short_name\" : \"QPG8+P2\",\n               \"types\" : [ \"plus_code\" ]\n            },\n            {\n               \"long_name\" : \"Freetown\",\n               \"short_name\" : \"Freetown\",\ [...]
     "headers" : {
       "Content-Type" : "application/json; charset=UTF-8",
-      "Date" : "Tue, 03 Nov 2020 09:39:12 GMT",
+      "Date" : "Fri, 19 Aug 2022 08:22:04 GMT",
       "Pragma" : "no-cache",
       "Expires" : "Fri, 01 Jan 1990 00:00:00 GMT",
       "Cache-Control" : "no-cache, must-revalidate",
@@ -18,11 +18,11 @@
       "Server" : "mafe",
       "X-XSS-Protection" : "0",
       "X-Frame-Options" : "SAMEORIGIN",
-      "Server-Timing" : "gfet4t7; dur=45",
-      "Alt-Svc" : "h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
+      "Server-Timing" : "gfet4t7; dur=96",
+      "Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
     }
   },
-  "uuid" : "93b092b6-d2d4-485c-b9a8-a1e4625e343a",
+  "uuid" : "d110a55b-70f9-4d24-bb63-53ca9fd2e95e",
   "persistent" : true,
   "insertionIndex" : 4
 }
\ No newline at end of file