From 8373ba58b5b76cb1e58f91cfae4d88f1994833a3 Mon Sep 17 00:00:00 2001 From: Enes Kutay SEZEN Date: Mon, 20 Oct 2025 18:41:35 +0300 Subject: [PATCH 1/7] Add active field to ConstructorItem and ConstructorVariation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Boolean active field to ConstructorItem and ConstructorVariation classes to support marking items and variations as active/inactive. Include getter/setter methods and ensure the field is properly serialized in the toMap() method. Add comprehensive tests verifying that: - Active field is included in serialized output when set - Active field defaults to null when not set - Getter/setter methods work correctly for both true and false values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../constructor/client/ConstructorItem.java | 18 +++++++++++++ .../client/ConstructorVariation.java | 19 ++++++++++++++ .../client/ConstructorItemTest.java | 24 +++++++++++++++++ .../client/ConstructorVariationTest.java | 26 +++++++++++++++++++ 4 files changed, 87 insertions(+) diff --git a/constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java b/constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java index 9212a2fc..26d417c8 100644 --- a/constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java +++ b/constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java @@ -14,6 +14,7 @@ public class ConstructorItem { private String imageUrl; private String id; private String description; + private Boolean active; private Map> facets; private Map metadata; private List groupIds; @@ -37,6 +38,7 @@ public ConstructorItem(String id, String name) throws IllegalArgumentException { this.url = null; this.imageUrl = null; this.description = null; + this.active = null; this.facets = null; this.metadata = null; this.groupIds = null; @@ -54,6 +56,7 @@ public ConstructorItem(String id) throws IllegalArgumentException { this.url = null; this.imageUrl = null; this.description = null; + this.active = null; this.facets = null; this.metadata = null; this.groupIds = null; @@ -82,6 +85,7 @@ public Map toMap() { dataMap.put("facets", this.facets); dataMap.put("group_ids", this.groupIds); dataMap.put("description", this.description); + dataMap.put("active", this.active); params.put("data", dataMap); return params; @@ -171,6 +175,20 @@ public void setDescription(String description) { this.description = description; } + /** + * @return the active + */ + public Boolean getActive() { + return active; + } + + /** + * @param active the active to set + */ + public void setActive(Boolean active) { + this.active = active; + } + /** * @return the id */ diff --git a/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java b/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java index 7d2d93f2..8826e250 100644 --- a/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java +++ b/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java @@ -15,6 +15,7 @@ public class ConstructorVariation { private String id; private String itemId; private String description; + private Boolean active; private Map> facets; private Map metadata; private List groupIds; @@ -45,6 +46,7 @@ public ConstructorVariation(String id, String itemId, String name) this.url = null; this.imageUrl = null; this.description = null; + this.active = null; this.facets = null; this.metadata = null; this.groupIds = null; @@ -67,6 +69,7 @@ public ConstructorVariation(String id, String itemId) throws IllegalArgumentExce this.url = null; this.imageUrl = null; this.description = null; + this.active = null; this.facets = null; this.metadata = null; this.groupIds = null; @@ -85,6 +88,7 @@ public ConstructorVariation(String id) throws IllegalArgumentException { this.url = null; this.imageUrl = null; this.description = null; + this.active = null; this.facets = null; this.metadata = null; this.groupIds = null; @@ -114,6 +118,7 @@ public Map toMap() { dataMap.put("facets", this.facets); dataMap.put("group_ids", this.groupIds); dataMap.put("description", this.description); + dataMap.put("active", this.active); params.put("data", dataMap); return params; @@ -203,6 +208,20 @@ public void setDescription(String description) { this.description = description; } + /** + * @return the active + */ + public Boolean getActive() { + return active; + } + + /** + * @param active the active to set + */ + public void setActive(Boolean active) { + this.active = active; + } + /** * @return the id */ diff --git a/constructorio-client/src/test/java/io/constructor/client/ConstructorItemTest.java b/constructorio-client/src/test/java/io/constructor/client/ConstructorItemTest.java index e912843e..7d0184b2 100644 --- a/constructorio-client/src/test/java/io/constructor/client/ConstructorItemTest.java +++ b/constructorio-client/src/test/java/io/constructor/client/ConstructorItemTest.java @@ -43,6 +43,7 @@ public void newShouldReturnDefaultProperties() throws Exception { assertEquals(item.getUrl(), null); assertEquals(item.getImageUrl(), null); assertEquals(item.getDescription(), null); + assertEquals(item.getActive(), null); assertEquals(item.getId(), itemName); assertEquals(item.getFacets(), null); assertEquals(item.getGroupIds(), null); @@ -60,6 +61,7 @@ public void settersShouldSet() throws Exception { item.setUrl("https://constructor.io/test"); item.setImageUrl("https://constructor.io/test.png"); item.setDescription("See the world!"); + item.setActive(true); item.setId("TICK-007"); item.setGroupIds(Arrays.asList("Lucky Tickets", "Special Tickets", "Fancy Tickets")); @@ -69,6 +71,7 @@ public void settersShouldSet() throws Exception { assertEquals(item.getUrl(), "https://constructor.io/test"); assertEquals(item.getImageUrl(), "https://constructor.io/test.png"); assertEquals(item.getDescription(), "See the world!"); + assertEquals(item.getActive(), true); assertEquals(item.getId(), "TICK-007"); assertEquals(item.getFacets(), null); assertEquals(item.getMetadata(), null); @@ -97,4 +100,25 @@ public void toMapShouldHaveADataObject() throws Exception { assertEquals(metadataFields.get("image_url"), "https://constructor.io/test.png"); assertEquals(metadataFields.get("test_field"), "test"); } + + @Test + public void toMapShouldIncludeActiveWhenSet() throws Exception { + String itemName = this.getRandomProductName(); + String itemId = itemName; + ConstructorItem item = new ConstructorItem(itemId, itemName); + item.setActive(true); + + Map dataFields = (Map) item.toMap().get("data"); + assertEquals(dataFields.get("active"), true); + } + + @Test + public void toMapShouldIncludeActiveAsNullWhenNotSet() throws Exception { + String itemName = this.getRandomProductName(); + String itemId = itemName; + ConstructorItem item = new ConstructorItem(itemId, itemName); + + Map dataFields = (Map) item.toMap().get("data"); + assertEquals(dataFields.get("active"), null); + } } diff --git a/constructorio-client/src/test/java/io/constructor/client/ConstructorVariationTest.java b/constructorio-client/src/test/java/io/constructor/client/ConstructorVariationTest.java index 02f75e4a..b0f82fef 100644 --- a/constructorio-client/src/test/java/io/constructor/client/ConstructorVariationTest.java +++ b/constructorio-client/src/test/java/io/constructor/client/ConstructorVariationTest.java @@ -47,6 +47,7 @@ public void newShouldReturnDefaultProperties() throws Exception { assertEquals(variation.getUrl(), null); assertEquals(variation.getImageUrl(), null); assertEquals(variation.getDescription(), null); + assertEquals(variation.getActive(), null); assertEquals(variation.getId(), variationName); assertEquals(variation.getItemId(), itemId); assertEquals(variation.getFacets(), null); @@ -67,6 +68,7 @@ public void settersShouldSet() throws Exception { variation.setUrl("https://constructor.io/test"); variation.setImageUrl("https://constructor.io/test.png"); variation.setDescription("See the world!"); + variation.setActive(false); variation.setId("TICK-007"); variation.setItemId("TICK"); variation.setGroupIds(Arrays.asList("Lucky Tickets", "Special Tickets", "Fancy Tickets")); @@ -77,6 +79,7 @@ public void settersShouldSet() throws Exception { assertEquals(variation.getUrl(), "https://constructor.io/test"); assertEquals(variation.getImageUrl(), "https://constructor.io/test.png"); assertEquals(variation.getDescription(), "See the world!"); + assertEquals(variation.getActive(), false); assertEquals(variation.getId(), "TICK-007"); assertEquals(variation.getItemId(), "TICK"); assertEquals(variation.getFacets(), null); @@ -108,4 +111,27 @@ public void toMapShouldHaveADataObject() throws Exception { assertEquals(metadataFields.get("image_url"), "https://constructor.io/test.png"); assertEquals(metadataFields.get("test_field"), "test"); } + + @Test + public void toMapShouldIncludeActiveWhenSet() throws Exception { + String variationName = this.getRandomProductName(); + String itemId = this.getRandomProductName(); + ConstructorVariation variation = + new ConstructorVariation(variationName, itemId, variationName); + variation.setActive(false); + + Map dataFields = (Map) variation.toMap().get("data"); + assertEquals(dataFields.get("active"), false); + } + + @Test + public void toMapShouldIncludeActiveAsNullWhenNotSet() throws Exception { + String variationName = this.getRandomProductName(); + String itemId = this.getRandomProductName(); + ConstructorVariation variation = + new ConstructorVariation(variationName, itemId, variationName); + + Map dataFields = (Map) variation.toMap().get("data"); + assertEquals(dataFields.get("active"), null); + } } From a9684dda3026b68c00a4474369d06f2553454e9f Mon Sep 17 00:00:00 2001 From: Enes Kutay SEZEN Date: Mon, 20 Oct 2025 20:14:26 +0300 Subject: [PATCH 2/7] Update constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../src/main/java/io/constructor/client/ConstructorItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java b/constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java index 26d417c8..9879e116 100644 --- a/constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java +++ b/constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java @@ -176,7 +176,7 @@ public void setDescription(String description) { } /** - * @return the active + * @return the active status of the item */ public Boolean getActive() { return active; From 861538f7760f04ff8670c402e15ae6b6a1424d63 Mon Sep 17 00:00:00 2001 From: Enes Kutay SEZEN Date: Mon, 20 Oct 2025 20:14:42 +0300 Subject: [PATCH 3/7] Update constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../src/main/java/io/constructor/client/ConstructorItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java b/constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java index 9879e116..13727c40 100644 --- a/constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java +++ b/constructorio-client/src/main/java/io/constructor/client/ConstructorItem.java @@ -183,7 +183,7 @@ public Boolean getActive() { } /** - * @param active the active to set + * @param active the active status to set for the item */ public void setActive(Boolean active) { this.active = active; From baa4b00ebf34b16a6b1465276724c53b79077b72 Mon Sep 17 00:00:00 2001 From: Enes Kutay SEZEN Date: Mon, 20 Oct 2025 20:14:54 +0300 Subject: [PATCH 4/7] Update constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../main/java/io/constructor/client/ConstructorVariation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java b/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java index 8826e250..3f523215 100644 --- a/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java +++ b/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java @@ -216,7 +216,7 @@ public Boolean getActive() { } /** - * @param active the active to set + * @param active the active status to set for the variation */ public void setActive(Boolean active) { this.active = active; From 129bfb9e1ad6ec1f780de117fcb01a2b9716fecf Mon Sep 17 00:00:00 2001 From: Enes Kutay SEZEN Date: Mon, 20 Oct 2025 20:15:02 +0300 Subject: [PATCH 5/7] Update constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../main/java/io/constructor/client/ConstructorVariation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java b/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java index 3f523215..05a5cf65 100644 --- a/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java +++ b/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java @@ -209,7 +209,7 @@ public void setDescription(String description) { } /** - * @return the active + * @return the active status of the variation */ public Boolean getActive() { return active; From 23ccb006314c5a0d21ef40d28dfd4cbf6d194f9f Mon Sep 17 00:00:00 2001 From: Enes Kutay SEZEN Date: Mon, 20 Oct 2025 20:53:57 +0300 Subject: [PATCH 6/7] Lint --- .../main/java/io/constructor/client/ConstructorVariation.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java b/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java index 05a5cf65..0319edec 100644 --- a/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java +++ b/constructorio-client/src/main/java/io/constructor/client/ConstructorVariation.java @@ -22,7 +22,8 @@ public class ConstructorVariation { /** * Creates a variation. Optional public fields are in the API documentation + * href="https://docs.constructor.com/docs/integrating-with-constructor-product-catalog-items-variations">API + * documentation * * @param id the id of the variation that you are adding. * @param itemId the id of the item this variation is attached to. From c280bd9625763e769d747aadedd458dca3988b4b Mon Sep 17 00:00:00 2001 From: Enes Kutay SEZEN Date: Thu, 23 Oct 2025 14:51:58 +0300 Subject: [PATCH 7/7] Update version tests --- .../ConstructorIOAutocompleteUrlEncodingTest.java | 8 ++++---- .../constructor/client/ConstructorIOBasicTest.java | 14 +++++++------- .../client/ConstructorIOSearchUrlEncodingTest.java | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/constructorio-client/src/test/java/io/constructor/client/ConstructorIOAutocompleteUrlEncodingTest.java b/constructorio-client/src/test/java/io/constructor/client/ConstructorIOAutocompleteUrlEncodingTest.java index b2f2228a..6b057852 100644 --- a/constructorio-client/src/test/java/io/constructor/client/ConstructorIOAutocompleteUrlEncodingTest.java +++ b/constructorio-client/src/test/java/io/constructor/client/ConstructorIOAutocompleteUrlEncodingTest.java @@ -42,7 +42,7 @@ public void AutocompleteWithPlusShouldBeEncodedInUrl() throws Exception { RecordedRequest recordedRequest = mockServer.takeRequest(); String expectedPath = - String.format("/autocomplete/r%%2Bco?key=%s&c=ciojava-7.0.0", apiKey); + String.format("/autocomplete/r%%2Bco?key=%s&c=ciojava-7.1.0", apiKey); String actualPath = recordedRequest.getPath(); assertEquals("recorded request is encoded correctly", actualPath, expectedPath); } @@ -60,7 +60,7 @@ public void AutocompleteWithSpaceShouldBeEncodedInUrl() throws Exception { RecordedRequest recordedRequest = mockServer.takeRequest(); String expectedPath = - String.format("/autocomplete/r%%20co?key=%s&c=ciojava-7.0.0", apiKey); + String.format("/autocomplete/r%%20co?key=%s&c=ciojava-7.1.0", apiKey); String actualPath = recordedRequest.getPath(); assertEquals("recorded request is encoded correctly", actualPath, expectedPath); } @@ -78,7 +78,7 @@ public void AutocompleteWithSlashShouldBeEncodedInUrl() throws Exception { RecordedRequest recordedRequest = mockServer.takeRequest(); String expectedPath = - String.format("/autocomplete/r%%2Fco?key=%s&c=ciojava-7.0.0", apiKey); + String.format("/autocomplete/r%%2Fco?key=%s&c=ciojava-7.1.0", apiKey); String actualPath = recordedRequest.getPath(); assertEquals("recorded request is encoded correctly", actualPath, expectedPath); } @@ -95,7 +95,7 @@ public void AutocompleteWithSingleQuoteShouldBeAllowedInUrl() throws Exception { constructor.autocomplete(request, null); RecordedRequest recordedRequest = mockServer.takeRequest(); - String expectedPath = String.format("/autocomplete/r'co?key=%s&c=ciojava-7.0.0", apiKey); + String expectedPath = String.format("/autocomplete/r'co?key=%s&c=ciojava-7.1.0", apiKey); String actualPath = recordedRequest.getPath(); assertEquals("recorded request is encoded correctly", actualPath, expectedPath); } diff --git a/constructorio-client/src/test/java/io/constructor/client/ConstructorIOBasicTest.java b/constructorio-client/src/test/java/io/constructor/client/ConstructorIOBasicTest.java index d8a3e721..0054c15e 100644 --- a/constructorio-client/src/test/java/io/constructor/client/ConstructorIOBasicTest.java +++ b/constructorio-client/src/test/java/io/constructor/client/ConstructorIOBasicTest.java @@ -143,7 +143,7 @@ public void makeUrlShouldReturnAUrl() throws Exception { HttpUrl url = constructor.makeUrl(Arrays.asList("getitUuuurl")); assertEquals("host is set", url.host(), "ac.cnstrc.com"); assertEquals("protocol is set", url.scheme(), "https"); - assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.0"); + assertEquals("version is set", url.queryParameter("c"), "ciojava-7.1.0"); assertEquals("apiKey is set", url.queryParameter("key"), "doinkaKey"); } @@ -160,7 +160,7 @@ public void makeUrlWithBasePathShouldReturnAUrl() throws Exception { assertEquals("Path is correct", url.encodedPath(), "/123/2345/getitUuuurl"); assertEquals("host is set", url.host(), "ac.cnstrc.com"); assertEquals("protocol is set", url.scheme(), "https"); - assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.0"); + assertEquals("version is set", url.queryParameter("c"), "ciojava-7.1.0"); assertEquals("apiKey is set", url.queryParameter("key"), "doinkaKey"); } @@ -179,7 +179,7 @@ public void makeUrlWithBasePathAndUserInfoShouldReturnAUrl() throws Exception { assertEquals("Path is correct", url.encodedPath(), "/123/2345/getitUuuurl"); assertEquals("host is set", url.host(), "ac.cnstrc.com"); assertEquals("protocol is set", url.scheme(), "https"); - assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.0"); + assertEquals("version is set", url.queryParameter("c"), "ciojava-7.1.0"); assertEquals("apiKey is set", url.queryParameter("key"), "doinkaKey"); } @@ -190,7 +190,7 @@ public void makeUrlWithUserIdShouldReturnAUrl() throws Exception { HttpUrl url = constructor.makeUrl(Arrays.asList("getitUuuurl"), info); assertEquals("host is set", url.host(), "ac.cnstrc.com"); assertEquals("protocol is set", url.scheme(), "https"); - assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.0"); + assertEquals("version is set", url.queryParameter("c"), "ciojava-7.1.0"); assertEquals("apiKey is set", url.queryParameter("key"), "doinkaKey"); assertEquals("session id is set", url.queryParameter("s"), "2"); assertEquals("client id is set", url.queryParameter("i"), "sideshow bob"); @@ -205,7 +205,7 @@ public void makeUrlWithUserInfoShouldReturnAUrl() throws Exception { HttpUrl url = constructor.makeUrl(Arrays.asList("getitUuuurl"), info); assertEquals("host is set", url.host(), "ac.cnstrc.com"); assertEquals("protocol is set", url.scheme(), "https"); - assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.0"); + assertEquals("version is set", url.queryParameter("c"), "ciojava-7.1.0"); assertEquals("apiKey is set", url.queryParameter("key"), "doinkaKey"); assertEquals("session id is set", url.queryParameter("s"), "2"); assertEquals("client id is set", url.queryParameter("i"), "sideshow bob"); @@ -220,7 +220,7 @@ public void makeUrlWithUserSegmentsShouldReturnAUrl() throws Exception { HttpUrl url = constructor.makeUrl(Arrays.asList("getitUuuurl"), info); assertEquals("host is set", url.host(), "ac.cnstrc.com"); assertEquals("protocol is set", url.scheme(), "https"); - assertEquals("version is set", url.queryParameter("c"), "ciojava-7.0.0"); + assertEquals("version is set", url.queryParameter("c"), "ciojava-7.1.0"); assertEquals("apiKey is set", url.queryParameter("key"), "doinkaKey"); assertEquals("session id is set", url.queryParameter("s"), "2"); assertEquals("client id is set", url.queryParameter("i"), "sideshow bob"); @@ -238,7 +238,7 @@ public void verifyShouldReturnTrueWithValidKeyTokenPair() throws Exception { @Test public void getVersionShouldReturnClientVersion() throws Exception { ConstructorIO constructor = new ConstructorIO(token, apiKey, true, null); - assertEquals("grabs version from pom.xml", constructor.getVersion(), "ciojava-7.0.0"); + assertEquals("grabs version from pom.xml", constructor.getVersion(), "ciojava-7.1.0"); } @Test diff --git a/constructorio-client/src/test/java/io/constructor/client/ConstructorIOSearchUrlEncodingTest.java b/constructorio-client/src/test/java/io/constructor/client/ConstructorIOSearchUrlEncodingTest.java index 849f56a0..72d8b7aa 100644 --- a/constructorio-client/src/test/java/io/constructor/client/ConstructorIOSearchUrlEncodingTest.java +++ b/constructorio-client/src/test/java/io/constructor/client/ConstructorIOSearchUrlEncodingTest.java @@ -43,7 +43,7 @@ public void SearchWithPlusShouldBeEncodedInUrl() throws Exception { RecordedRequest recordedRequest = mockServer.takeRequest(); String expectedPath = String.format( - "/search/r%%2Bco?key=%s&c=ciojava-7.0.0§ion=Products&num_results_per_page=30", + "/search/r%%2Bco?key=%s&c=ciojava-7.1.0§ion=Products&num_results_per_page=30", apiKey); String actualPath = recordedRequest.getPath(); assertEquals("recorded request is encoded correctly", actualPath, expectedPath); @@ -63,7 +63,7 @@ public void SearchWithSpaceShouldBeEncodedInUrl() throws Exception { RecordedRequest recordedRequest = mockServer.takeRequest(); String expectedPath = String.format( - "/search/r%%20co?key=%s&c=ciojava-7.0.0§ion=Products&num_results_per_page=30", + "/search/r%%20co?key=%s&c=ciojava-7.1.0§ion=Products&num_results_per_page=30", apiKey); String actualPath = recordedRequest.getPath(); assertEquals("recorded request is encoded correctly", actualPath, expectedPath); @@ -83,7 +83,7 @@ public void SearchWithSlashShouldBeEncodedInUrl() throws Exception { RecordedRequest recordedRequest = mockServer.takeRequest(); String expectedPath = String.format( - "/search/r%%2Fco?key=%s&c=ciojava-7.0.0§ion=Products&num_results_per_page=30", + "/search/r%%2Fco?key=%s&c=ciojava-7.1.0§ion=Products&num_results_per_page=30", apiKey); String actualPath = recordedRequest.getPath(); assertEquals("recorded request is encoded correctly", actualPath, expectedPath); @@ -103,7 +103,7 @@ public void SearchWithSingleQuoteShouldBeAllowedInUrl() throws Exception { RecordedRequest recordedRequest = mockServer.takeRequest(); String expectedPath = String.format( - "/search/r'co?key=%s&c=ciojava-7.0.0§ion=Products&num_results_per_page=30", + "/search/r'co?key=%s&c=ciojava-7.1.0§ion=Products&num_results_per_page=30", apiKey); String actualPath = recordedRequest.getPath(); assertEquals("recorded request is encoded correctly", actualPath, expectedPath);