diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/test/utils/CompareUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/test/utils/CompareUtilities.java index 52cab6e33..c23813bfe 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/test/utils/CompareUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/test/utils/CompareUtilities.java @@ -40,7 +40,9 @@ public class CompareUtilities extends BaseTestingUtilities { } private String presentExpected(String expected) { - if (expected.startsWith("$") && expected.endsWith("$")) { + if (expected == null) { + return "null"; + } else if (expected.startsWith("$") && expected.endsWith("$")) { if (expected.startsWith("$choice:")) { return "Contains one of "+readChoices(expected.substring(8, expected.length()-1)).toString(); } else if (expected.startsWith("$fragments:")) {