@Test public void hashcodeValidationCertificateCorrectlyPresent() throws Exception { Reports response = validationService.validate(getValidationDocumentSingletonList()); SignatureValidationData signatureValidationData = response.getSimpleReport().getValidationConclusion().getSignatures().get(0); CertificateFactory cf = CertificateFactory.getInstance("X.509"); Assert.assertEquals(3, signatureValidationData.getCertificates().size()); ee.openeid.siva.validation.document.report.Certificate signerCertificate = signatureValidationData.getCertificatesByType(CertificateType.SIGNING).get(0); Certificate signerX509Certificate = cf.generateCertificate(new ByteArrayInputStream(Base64.decode(signerCertificate.getContent().getBytes()))); Assert.assertEquals("PAULIUS PODOLSKIS", CertUtil.getCommonName((X509Certificate) signerX509Certificate)); Assert.assertEquals("PAULIUS PODOLSKIS", signerCertificate.getCommonName()); ee.openeid.siva.validation.document.report.Certificate timestampCertificate = signatureValidationData.getCertificatesByType((CertificateType.SIGNATURE_TIMESTAMP)).get(0); Certificate timestampX509Certificate = cf.generateCertificate(new ByteArrayInputStream(Base64.decode(timestampCertificate.getContent().getBytes()))); Assert.assertEquals("SK TIMESTAMPING AUTHORITY", CertUtil.getCommonName((X509Certificate) timestampX509Certificate)); Assert.assertEquals("SK TIMESTAMPING AUTHORITY", timestampCertificate.getCommonName()); ee.openeid.siva.validation.document.report.Certificate revocationCertificate = signatureValidationData.getCertificatesByType((CertificateType.REVOCATION)).get(0); Certificate revocationX509Certificate = cf.generateCertificate(new ByteArrayInputStream(Base64.decode(revocationCertificate.getContent().getBytes()))); Assert.assertEquals("VI Registru Centras OCSP (IssuingCA-A)", CertUtil.getCommonName((X509Certificate) revocationX509Certificate)); Assert.assertEquals("VI Registru Centras OCSP (IssuingCA-A)", revocationCertificate.getCommonName()); }
public Reports validate(List<ValidationDocument> validationDocuments) { List<Reports> reports = validationDocuments.stream().map(validationDocument -> validateDocument(validationDocument)).collect(Collectors.toList()); return mergeReportsToOne(reports); }
HashcodeGenericValidationService extends GenericValidationService { public Reports validate(List<ValidationDocument> validationDocuments) { List<Reports> reports = validationDocuments.stream().map(validationDocument -> validateDocument(validationDocument)).collect(Collectors.toList()); return mergeReportsToOne(reports); } }
HashcodeGenericValidationService extends GenericValidationService { public Reports validate(List<ValidationDocument> validationDocuments) { List<Reports> reports = validationDocuments.stream().map(validationDocument -> validateDocument(validationDocument)).collect(Collectors.toList()); return mergeReportsToOne(reports); }  }
HashcodeGenericValidationService extends GenericValidationService { public Reports validate(List<ValidationDocument> validationDocuments) { List<Reports> reports = validationDocuments.stream().map(validationDocument -> validateDocument(validationDocument)).collect(Collectors.toList()); return mergeReportsToOne(reports); }  Reports validate(List<ValidationDocument> validationDocuments); }
HashcodeGenericValidationService extends GenericValidationService { public Reports validate(List<ValidationDocument> validationDocuments) { List<Reports> reports = validationDocuments.stream().map(validationDocument -> validateDocument(validationDocument)).collect(Collectors.toList()); return mergeReportsToOne(reports); }  Reports validate(List<ValidationDocument> validationDocuments);  }