### Question:
DDocSignature implements Signature { @Override public ValidationResult validateSignature() { List validationResult = this.origin.verify(origin.getSignedDoc(), true, true); return new DDocSignatureValidationResult(validationResult, origin.getSignedDoc().getFormat()); } DDocSignature(org.digidoc4j.ddoc.Signature signature); void setCertificate(X509Cert cert); @Override String getCity(); @Override String getCountryName(); @Override String getId(); @Override String getUniqueId(); @Override byte[] getOCSPNonce(); @Override X509Cert getOCSPCertificate(); @Override @Deprecated String getPolicy(); @Override String getPostalCode(); @Override Date getOCSPResponseCreationTime(); @Override @Deprecated Date getProducedAt(); @Override Date getTimeStampCreationTime(); @Override Date getTrustedSigningTime(); @Override SignatureProfile getProfile(); @Override String getSignatureMethod(); @Override List<String> getSignerRoles(); @Override X509Cert getSigningCertificate(); @Override Date getClaimedSigningTime(); @Override Date getSigningTime(); @Override @Deprecated URI getSignaturePolicyURI(); @Override String getStateOrProvince(); @Override X509Cert getTimeStampTokenCertificate(); @Override ValidationResult validateSignature(); @Override @Deprecated List<DigiDoc4JException> validate(); CertValue getCertValueOfType(int type); @Override byte[] getAdESSignature(); @Override @Deprecated byte[] getRawSignature(); int getIndexInArray(); void setIndexInArray(int indexInArray);  }### Answer:
@Test public void testSignatureExceptionHandling(){ Container container = new DDocOpener().open("src/test/resources/prodFiles/invalid-containers/Belgia_kandeavaldus_LIV.ddoc"); Signature signature = container.getSignatures().get(1); ValidationResult validationResult = signature.validateSignature(); Assert.assertEquals(3, validationResult.getErrors().size()); List<DigiDoc4JException> errors = validationResult.getErrors(); Assert.assertEquals("Signers cert not trusted, missing CA cert!", errors.get(0).getMessage()); Assert.assertEquals("Signing certificate issuer information does not match", errors.get(1).getMessage()); Assert.assertEquals("70org.digidoc4j.ddoc.DigiDocException; nested exception is: \n" + "\tERROR: 117 - No certificate for responder: 'byName: C=EE,O=AS Sertifitseerimiskeskus,OU=Sertifitseerimisteenused,CN=SK Proxy OCSP Responder 2008,E=pki@sk.ee' found in local certificate store!", errors.get(2).getMessage()); }