From 9a68fef5a4d3a7c75675bd07586e76990565f564 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Tue, 30 Apr 2024 08:39:45 -0600 Subject: [PATCH] Fix unit tests for WireMock 3 Signed-off-by: Taylor Smock --- .../mapillary/testutils/annotations/MapillaryURLWireMock.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/unit/org/openstreetmap/josm/plugins/mapillary/testutils/annotations/MapillaryURLWireMock.java b/test/unit/org/openstreetmap/josm/plugins/mapillary/testutils/annotations/MapillaryURLWireMock.java index 4d43c6362..7d7494d1f 100644 --- a/test/unit/org/openstreetmap/josm/plugins/mapillary/testutils/annotations/MapillaryURLWireMock.java +++ b/test/unit/org/openstreetmap/josm/plugins/mapillary/testutils/annotations/MapillaryURLWireMock.java @@ -38,6 +38,7 @@ import com.github.tomakehurst.wiremock.extension.Parameters; import com.github.tomakehurst.wiremock.extension.ResponseTransformer; import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemplateTransformer; +import com.github.tomakehurst.wiremock.extension.responsetemplating.TemplateEngine; import com.github.tomakehurst.wiremock.http.Request; import com.github.tomakehurst.wiremock.http.Response; import com.github.tomakehurst.wiremock.matching.AnythingPattern; @@ -122,7 +123,8 @@ public void beforeAll(final ExtensionContext context) throws Exception { final WireMockConfiguration wireMockConfiguration = new WireMockConfiguration().dynamicPort(); final FillerUrlReplacer fillerUrlReplacer = new FillerUrlReplacer(); - wireMockConfiguration.extensions(new CollectionEndpoint(), new ResponseTemplateTransformer(false), + wireMockConfiguration.extensions(new CollectionEndpoint(), + new ResponseTemplateTransformer(TemplateEngine.defaultTemplateEngine(), false, null, null), fillerUrlReplacer); // See JOSM #21121 for why this is necessary Path directory = Paths.get("test", "resources");