RemEvidenceService { public RemEvidenceBuilder createDeliveryNonDeliveryToRecipientBuilder() { return new RemEvidenceBuilder(EvidenceTypeInstance.DELIVERY_NON_DELIVERY_TO_RECIPIENT); }  RemEvidenceBuilder createDeliveryNonDeliveryToRecipientBuilder(); RemEvidenceBuilder createRelayRemMdAcceptanceRejectionBuilder(); static void verifySignature(SignedRemEvidence signedRemEvidence);  }
@Test public void testCreateDeliveryNonDeliveryToRecipientBuilder() throws Exception { RemEvidenceService remEvidenceService = new RemEvidenceService(); RemEvidenceBuilder builder = remEvidenceService.createDeliveryNonDeliveryToRecipientBuilder(); byte[] sampleMdnSmime = TestResources.getSampleMdnSmime(); builder.eventCode(EventCode.ACCEPTANCE) .evidenceIssuerPolicyID(TestResources.EVIDENCE_ISSUER_POLICY_ID) .evidenceIssuerDetails(TestResources.EVIDENCE_ISSUER_NAME) .senderIdentifier(TestResources.SENDER_IDENTIFIER) .recipientIdentifer(TestResources.RECIPIENT_IDENTIFIER) .documentTypeId(TestResources.DOC_TYPE_ID) .instanceIdentifier(TestResources.INSTANCE_IDENTIFIER) .payloadDigest("ThisIsASHA256Digest".getBytes()) .protocolSpecificEvidence(TransmissionRole.C_3, TransportProtocol.AS2, specificReceiptBytes); SignedRemEvidence signedRemEvidence = builder.buildRemEvidenceInstance(privateKeyEntry); assertNotNull(signedRemEvidence); assertEquals(signedRemEvidence.getEvidenceType(), EvidenceTypeInstance.DELIVERY_NON_DELIVERY_TO_RECIPIENT); XmldsigVerifier.verify(signedRemEvidence.getDocument()); }