diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java index ca2b322d6e1..ec6a6af187c 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java @@ -1312,13 +1312,13 @@ public class FhirInstanceValidatorDstu3Test { String input = IOUtils.toString(FhirInstanceValidatorDstu3Test.class.getResourceAsStream("/dstu3-rick-test.json"), Charsets.UTF_8); IResourceValidator.IValidatorResourceFetcher resourceFetcher = mock(IResourceValidator.IValidatorResourceFetcher.class); - when(resourceFetcher.validationPolicy(any(), anyString(), anyString(), anyString())).thenReturn(IResourceValidator.ReferenceValidationPolicy.CHECK_TYPE_IF_EXISTS); + when(resourceFetcher.validationPolicy(any(), any(), any(), any())).thenReturn(IResourceValidator.ReferenceValidationPolicy.CHECK_TYPE_IF_EXISTS); myInstanceVal.setValidatorResourceFetcher(resourceFetcher); myVal.validateWithResult(input); - verify(resourceFetcher, times(3)).resolveURL(any(), anyString(), anyString(), anyString(), anyString()); - verify(resourceFetcher, times(4)).validationPolicy(any(), anyString(), anyString(), anyString()); - verify(resourceFetcher, times(4)).fetch(any(), anyString(), anyString()); + verify(resourceFetcher, times(3)).resolveURL(any(), any(), anyString(), anyString(), anyString()); + verify(resourceFetcher, times(4)).validationPolicy(any(), any(), anyString(), anyString()); + verify(resourceFetcher, times(4)).fetch(any(), any(), anyString()); } @Test diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java index 044c97e5ebc..42b43c205dc 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java @@ -995,8 +995,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { List messages = logResultsAndReturnNonInformationalOnes(output); assertEquals(3, messages.size(), output.toString()); assertThat(messages.get(0).getMessage(), containsString("Element must have some content")); - assertThat(messages.get(1).getMessage(), containsString("Primitive types must have a value or must have child extensions")); - assertThat(messages.get(2).getMessage(), containsString("ele-1: 'All FHIR elements must have a @value or children' Rule 'All FHIR elements must have a @value or children' Failed")); + assertThat(messages.get(2).getMessage(), containsString("Primitive types must have a value or must have child extensions")); } @Test @@ -1398,13 +1397,13 @@ public class FhirInstanceValidatorR4Test extends BaseTest { String encoded = loadResource("/r4/r4-caredove-bundle.json"); IResourceValidator.IValidatorResourceFetcher resourceFetcher = mock(IResourceValidator.IValidatorResourceFetcher.class); - when(resourceFetcher.validationPolicy(any(), anyString(), anyString(), anyString())).thenReturn(IResourceValidator.ReferenceValidationPolicy.CHECK_TYPE_IF_EXISTS); + when(resourceFetcher.validationPolicy(any(), any(), any(), any())).thenReturn(IResourceValidator.ReferenceValidationPolicy.CHECK_TYPE_IF_EXISTS); myInstanceVal.setValidatorResourceFetcher(resourceFetcher); myVal.validateWithResult(encoded); - verify(resourceFetcher, times(15)).resolveURL(any(), anyString(), anyString(), anyString(), anyString()); - verify(resourceFetcher, times(12)).validationPolicy(any(), anyString(), anyString(), anyString()); - verify(resourceFetcher, times(12)).fetch(any(), anyString(), anyString()); + verify(resourceFetcher, times(15)).resolveURL(any(), any(), anyString(), anyString(), anyString()); + verify(resourceFetcher, times(12)).validationPolicy(any(), any(), anyString(), anyString()); + verify(resourceFetcher, times(12)).fetch(any(), any(), anyString()); } @Test