From d80a9ed84863dcbf5604296d08bdd9decd78ed2c Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Tue, 16 Mar 2021 11:37:49 -0400 Subject: [PATCH] Fixed test bug --- .../src/test/java/ca/uhn/fhir/util/TerserUtilTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/TerserUtilTest.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/TerserUtilTest.java index e8acc53ee32..52826cfc893 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/TerserUtilTest.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/TerserUtilTest.java @@ -45,9 +45,14 @@ class TerserUtilTest { p1Helper.setField("identifier.system", "http://org.com/sys"); p1Helper.setField("identifier.value", "123"); + Patient p1 = p1Helper.getResource(); + assertEquals(1, p1.getIdentifier().size()); + TerserUtilHelper p2Helper = TerserUtilHelper.newHelper(ourFhirContext, "Patient"); RuntimeResourceDefinition definition = p1Helper.getResourceDefinition(); - TerserUtil.cloneEidIntoResource(ourFhirContext, definition.getChildByName("identifier"), p1Helper.getResource(), p2Helper.getResource()); + + TerserUtil.cloneEidIntoResource(ourFhirContext, definition.getChildByName("identifier"), + p1.getIdentifier().get(0), p2Helper.getResource()); assertEquals(1, p2Helper.getFieldValues("identifier").size());