diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/ResourceElement.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/ResourceElement.java index 478117c91..beca8c137 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/ResourceElement.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/ResourceElement.java @@ -463,6 +463,7 @@ public class ResourceElement { } public boolean has(String name) { + loadChildren(); for (ResourceElement e : children) { if (name.equals(e.name())) { return true; diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/NarrativeGeneratorTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/NarrativeGeneratorTests.java index 9c8f4b25a..256e5ab08 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/NarrativeGeneratorTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/NarrativeGeneratorTests.java @@ -38,8 +38,9 @@ public class NarrativeGeneratorTests { private static RenderingContext rc; @BeforeAll - public static void setUp() throws FHIRException { + public static void setUp() throws FHIRException, IOException { rc = new RenderingContext(TestingUtilities.getSharedWorkerContext(), null, null, "http://hl7.org/fhir", "", null, ResourceRendererMode.END_USER, GenerationRules.VALID_RESOURCE); + rc.setDestDir(Utilities.path("[tmp]")); } @Test