From 9bdb1c8dd6c341f8ed98e6b28061d0803db29ccd Mon Sep 17 00:00:00 2001 From: Federico Mariani <34543311+Croway@users.noreply.github.com> Date: Tue, 12 Sep 2023 11:05:37 +0200 Subject: [PATCH] Upgrade failing test to FHIR 6.6.1 (#931) (cherry picked from commit 0d365fd48771d0f8a599154c908db179a1f9ebbe) --- .../java/org/apache/camel/component/fhir/FhirUpdateIT.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirUpdateIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirUpdateIT.java index c1056cc0bb2..3e3c3e072dc 100644 --- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirUpdateIT.java +++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirUpdateIT.java @@ -16,7 +16,6 @@ */ package org.apache.camel.component.fhir; -import java.net.URLEncoder; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; @@ -164,7 +163,7 @@ public void testResourceBySearchUrl() throws Exception { Date date = new SimpleDateFormat("yyyy-MM-dd").parse("1998-04-29"); assertNotEquals(date, patient.getBirthDate()); this.patient.setBirthDate(date); - String url = "Patient?" + Patient.SP_IDENTIFIER + '=' + URLEncoder.encode(this.patient.getId(), "UTF-8"); + String url = "Patient?" + Patient.SP_RES_ID + '=' + patient.getIdPart(); final Map headers = new HashMap<>(); // parameter type is org.hl7.fhir.instance.model.api.IBaseResource headers.put("CamelFhir.resource", this.patient); @@ -185,7 +184,7 @@ public void testResourceBySearchUrlAndResourceAsString() throws Exception { Date date = new SimpleDateFormat("yyyy-MM-dd").parse("1998-04-29"); assertNotEquals(date, patient.getBirthDate()); this.patient.setBirthDate(date); - String url = "Patient?" + Patient.SP_IDENTIFIER + '=' + URLEncoder.encode(this.patient.getId(), "UTF-8"); + String url = "Patient?" + Patient.SP_RES_ID + '=' + patient.getIdPart(); final Map headers = new HashMap<>(); // parameter type is org.hl7.fhir.instance.model.api.IBaseResource headers.put("CamelFhir.resourceAsString", this.fhirContext.newJsonParser().encodeResourceToString(this.patient));