@Test
public void testMinimalNonXMLBodyDocumentTemplatedSchemaCheck() {
super.init("noncodedcda/", "NonCodedCDAv2Helper-MinimalNonXMLBodyTemplatedCheck", "NonCodedCDA Helper: Minimal Non-XML Body Templated Check", "This uses the helper class to generate a full non coded CDA document with a minimal set of fields, and serialises to a CDA document, transforms it to templated format, which is validated against the templated schema.");
try {
// Use the helper to create the document
ClinicalDocument doc = NonCodedCDADocumentCreationHelper.createDocument(minimal);
String data = "PFRlc3RYTUw+PC9UZXN0WE1MPg==";
doc = NonCodedCDADocumentCreationHelper.addNonXMLBody(doc, AttachmentType.Base64, "text/xml", data);
// Serialise to a CDA XML Document
String xml = doc.serialise();
// And then transform and re-test against templated schema
testAgainstTemplatedSchema(
PropertyReader.getProperty("nonCodedCDASchemaPath")+"POCD_MT010011GB02.xsd",
xml);