QueryResponseValidator implements Validator<EbXMLQueryResponse, ValidationProfile> { @Override public void validate(EbXMLQueryResponse response, ValidationProfile profile) { notNull(response, "response cannot be null"); regResponseValidator.validate(response, profile); objectContainerValidator.validate(response, profile); List<ObjectReference> references = response.getReferences(); for (ObjectReference objRef : references) { metaDataAssert(objRef.getId() != null, MISSING_OBJ_REF); } validatePatientIdsAreIdentical(response); }  @Override void validate(EbXMLQueryResponse response, ValidationProfile profile);  }
@Test public void testValidateGoodCase() { validator.validate(transformer.toEbXML(response), profile); }
@Test public void testQueryResponseDoesNotHaveSubmissionSetLimitations() { response.getSubmissionSets().clear(); validator.validate(transformer.toEbXML(response), profile); }