diff --git a/peppol-evidence/src/main/java/no/difi/vefa/peppol/evidence/rem/RemEvidenceBuilder.java b/peppol-evidence/src/main/java/no/difi/vefa/peppol/evidence/rem/RemEvidenceBuilder.java index dfaf2eab..8e0fc798 100644 --- a/peppol-evidence/src/main/java/no/difi/vefa/peppol/evidence/rem/RemEvidenceBuilder.java +++ b/peppol-evidence/src/main/java/no/difi/vefa/peppol/evidence/rem/RemEvidenceBuilder.java @@ -34,7 +34,7 @@ public class RemEvidenceBuilder { private final EvidenceTypeInstance evidenceTypeInstance; - private String version; + private final String version = "1"; private EventCode eventCode; private EventReason eventReason; private String evidenceIdentifier = UUID.randomUUID().toString(); diff --git a/peppol-evidence/src/test/java/no/difi/vefa/peppol/evidence/rem/RemEvidenceBuilderTest.java b/peppol-evidence/src/test/java/no/difi/vefa/peppol/evidence/rem/RemEvidenceBuilderTest.java index 6b64a4a5..c1dbb328 100644 --- a/peppol-evidence/src/test/java/no/difi/vefa/peppol/evidence/rem/RemEvidenceBuilderTest.java +++ b/peppol-evidence/src/test/java/no/difi/vefa/peppol/evidence/rem/RemEvidenceBuilderTest.java @@ -67,6 +67,13 @@ public void createSampleRemEvidence() throws Exception { // Grabs the REMEvidenceType instance in order to make some assertions. REMEvidenceType remEvidenceInstance = signedRemEvidence.getRemEvidenceType(); + + // Issue #2 + assertNotNull(remEvidenceInstance.getVersion(), "The version attribute was not set!"); + assertEquals(remEvidenceInstance.getVersion(), "1"); + // ------------- Issue #2 -------------- + + assertEquals(remEvidenceInstance.getEventCode(), EventCode.ACCEPTANCE.getValue().toString()); // Transforms the rem evidence instance into an XML representation suitable for some checks. diff --git a/peppol-evidence/src/test/resources/sample-signed-formatted-rem.xml b/peppol-evidence/src/test/resources/sample-signed-formatted-rem.xml index 0c8168f8..0dcf37f7 100644 --- a/peppol-evidence/src/test/resources/sample-signed-formatted-rem.xml +++ b/peppol-evidence/src/test/resources/sample-signed-formatted-rem.xml @@ -31,7 +31,7 @@ - no.difi.vefa.peppol.common.model.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