TLValidationJob { public synchronized TLValidationJobSummary getSummary() { return new ValidationJobSummaryBuilder(cacheAccessFactory.getReadOnlyCacheAccess(), trustedListSources, listOfTrustedListSources) .build(); }  void setTrustedListSources(TLSource... trustedListSources); void setListOfTrustedListSources(LOTLSource... listOfTrustedListSources); void setExecutorService(ExecutorService executorService); void setOfflineDataLoader(DSSFileLoader offlineLoader); void setOnlineDataLoader(DSSFileLoader onlineLoader); void setCacheCleaner(final CacheCleaner cacheCleaner); void setTrustedListCertificateSource(TrustedListsCertificateSource trustedListCertificateSource); void setSynchronizationStrategy(SynchronizationStrategy synchronizationStrategy); void setDebug(boolean debug); void setLOTLAlerts(List<Alert<LOTLInfo>> lotlAlerts); void setTLAlerts(List<Alert<TLInfo>> tlAlerts); synchronized TLValidationJobSummary getSummary(); synchronized void offlineRefresh(); synchronized void onlineRefresh();  }
@Test public void test() { updateTLUrl("src/test/resources/lotlCache/CZ.xml"); TLValidationJob validationJob = getTLValidationJob(); TLValidationJobSummary summary = validationJob.getSummary(); assertEquals(0, summary.getNumberOfProcessedLOTLs()); assertEquals(1, summary.getNumberOfProcessedTLs()); List<TLInfo> tlInfos = summary.getOtherTLInfos(); assertEquals(1, tlInfos.size()); TLInfo czTL = tlInfos.get(0); assertNotNull(czTL.getDownloadCacheInfo().getLastStateTransitionTime()); assertFalse(czTL.getDownloadCacheInfo().getLastSuccessSynchronizationTime().after(czTL.getDownloadCacheInfo().getLastStateTransitionTime())); assertTrue(czTL.getDownloadCacheInfo().isSynchronized()); assertTrue(czTL.getParsingCacheInfo().isSynchronized()); assertTrue(czTL.getValidationCacheInfo().isSynchronized()); assertNull(czTL.getDownloadCacheInfo().getExceptionMessage()); assertNull(czTL.getDownloadCacheInfo().getExceptionStackTrace()); assertNull(czTL.getParsingCacheInfo().getExceptionMessage()); assertNull(czTL.getParsingCacheInfo().getExceptionStackTrace()); assertNull(czTL.getValidationCacheInfo().getExceptionMessage()); assertNull(czTL.getValidationCacheInfo().getExceptionStackTrace()); assertNotNull(czTL.getUrl()); assertNotNull(czTL.getParsingCacheInfo().getSequenceNumber()); assertNotNull(czTL.getParsingCacheInfo().getVersion()); assertEquals("CZ", czTL.getParsingCacheInfo().getTerritory()); assertNotNull(czTL.getParsingCacheInfo().getIssueDate()); assertNotNull(czTL.getParsingCacheInfo().getNextUpdateDate()); assertTrue(czTL.getParsingCacheInfo().getIssueDate().before(czTL.getParsingCacheInfo().getNextUpdateDate())); assertNotNull(czTL.getParsingCacheInfo().getDistributionPoints()); assertThrows(UnsupportedOperationException.class, () -> czTL.getParsingCacheInfo().getDistributionPoints().add(new String())); assertNotNull(czTL.getParsingCacheInfo().getTrustServiceProviders()); assertEquals(6, czTL.getParsingCacheInfo().getTrustServiceProviders().size()); assertThrows(UnsupportedOperationException.class, () -> czTL.getParsingCacheInfo().getTrustServiceProviders().add(new TrustServiceProvider())); assertEquals(6, czTL.getParsingCacheInfo().getTrustServiceProviders().size()); TrustServiceProvider trustServiceProvider = czTL.getParsingCacheInfo().getTrustServiceProviders().get(0); assertThrows(UnsupportedOperationException.class, () -> trustServiceProvider.getElectronicAddresses().put(new String(), new ArrayList<String>())); assertThrows(UnsupportedOperationException.class, () -> trustServiceProvider.getNames().put(new String(), new ArrayList<String>())); assertThrows(UnsupportedOperationException.class, () -> trustServiceProvider.getTradeNames().put(new String(), new ArrayList<String>())); assertThrows(UnsupportedOperationException.class, () -> trustServiceProvider.getInformation().put(new String(), new String())); assertThrows(UnsupportedOperationException.class, () -> trustServiceProvider.getPostalAddresses().put(new String(), new String())); assertThrows(UnsupportedOperationException.class, () -> trustServiceProvider.getRegistrationIdentifiers().add(new String())); assertThrows(UnsupportedOperationException.class, () -> trustServiceProvider.getServices().add(trustServiceProvider.getServices().get(0))); TrustService trustService = trustServiceProvider.getServices().get(0); assertThrows(UnsupportedOperationException.class, () -> trustService.getCertificates().add(czSigningCertificate)); TimeDependentValues<TrustServiceStatusAndInformationExtensions> timeDependentValues = trustService.getStatusAndInformationExtensions(); TrustServiceStatusAndInformationExtensions latest = timeDependentValues.getLatest(); assertThrows(UnsupportedOperationException.class, () -> latest.getAdditionalServiceInfoUris().add(new String())); assertThrows(UnsupportedOperationException.class, () -> latest.getConditionsForQualifiers() .add(new ConditionForQualifiers(new CompositeCondition(), new ArrayList<String>()))); assertThrows(UnsupportedOperationException.class, () -> latest.getNames().put(new String(), new ArrayList<String>())); assertThrows(UnsupportedOperationException.class, () -> latest.getServiceSupplyPoints().add(new String())); assertEquals(Indication.TOTAL_PASSED, czTL.getValidationCacheInfo().getIndication()); assertNull(czTL.getValidationCacheInfo().getSubIndication()); assertNotNull(czTL.getValidationCacheInfo().getSigningTime()); assertNotNull(czTL.getValidationCacheInfo().getSigningCertificate()); assertEquals(czSigningCertificate, czTL.getValidationCacheInfo().getSigningCertificate()); }
@Test public void lotlTest() { TLValidationJob validationJob = getLOTLValidationJob(); TLValidationJobSummary summary = validationJob.getSummary(); assertEquals(1, summary.getNumberOfProcessedLOTLs()); assertEquals(31, summary.getNumberOfProcessedTLs()); List<TLInfo> otherTLInfos = summary.getOtherTLInfos(); assertEquals(0, otherTLInfos.size()); List<LOTLInfo> lotlInfos = summary.getLOTLInfos(); assertEquals(1, lotlInfos.size()); List<CertificateToken> potentialSigners = lotlInfos.get(0).getValidationCacheInfo().getPotentialSigners(); assertTrue(Utils.isCollectionNotEmpty(potentialSigners)); List<CertificateToken> keyStoreCertificates = lotlSource.getCertificateSource().getCertificates(); assertEquals(keyStoreCertificates.size(), potentialSigners.size()); for (CertificateToken certificate : potentialSigners) { assertTrue(keyStoreCertificates.contains(certificate)); } List<TLInfo> tlInfos = lotlInfos.get(0).getTLInfos(); assertEquals(31, tlInfos.size()); for (TLInfo tlInfo : tlInfos) { if (tlInfo.getDownloadCacheInfo().isResultExist()) { assertNull(tlInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(tlInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertNull(tlInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(tlInfo.getParsingCacheInfo().getExceptionStackTrace()); assertNull(tlInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(tlInfo.getValidationCacheInfo().getExceptionStackTrace()); assertTrue(Utils.isCollectionNotEmpty(tlInfo.getValidationCacheInfo().getPotentialSigners())); } } }
@Test public void lotlValidationSummaryExtractionTimeoutTest() { TLValidationJob validationJob = getLOTLValidationJob(); assertTimeout(ofMillis(50), () -> { validationJob.getSummary(); }); }
@Test public void brokenSigTest() { updateTLUrl("src/test/resources/lotlCache/CZ_broken-sig.xml"); TLValidationJobSummary summary = getTLValidationJob().getSummary(); assertEquals(0, summary.getNumberOfProcessedLOTLs()); assertEquals(1, summary.getNumberOfProcessedTLs()); List<TLInfo> tlInfos = summary.getOtherTLInfos(); assertEquals(1, tlInfos.size()); TLInfo czTL = tlInfos.get(0); assertNull(czTL.getDownloadCacheInfo().getExceptionMessage()); assertNull(czTL.getDownloadCacheInfo().getExceptionStackTrace()); assertNull(czTL.getParsingCacheInfo().getExceptionMessage()); assertNull(czTL.getParsingCacheInfo().getExceptionStackTrace()); assertNull(czTL.getValidationCacheInfo().getExceptionMessage()); assertNull(czTL.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_FAILED, czTL.getValidationCacheInfo().getIndication()); assertEquals(SubIndication.HASH_FAILURE, czTL.getValidationCacheInfo().getSubIndication()); assertNotNull(czTL.getValidationCacheInfo().getSigningTime()); assertNotNull(czTL.getValidationCacheInfo().getSigningCertificate()); assertEquals(czSigningCertificate, czTL.getValidationCacheInfo().getSigningCertificate()); }
@Test public void tlEmptyTest() { updateTLUrl("src/test/resources/lotlCache/CZ_empty.xml"); TLValidationJobSummary summary = getTLValidationJob().getSummary(); assertEquals(0, summary.getNumberOfProcessedLOTLs()); assertEquals(1, summary.getNumberOfProcessedTLs()); List<TLInfo> tlInfos = summary.getOtherTLInfos(); assertEquals(1, tlInfos.size()); TLInfo czTL = tlInfos.get(0); assertFalse(czTL.getDownloadCacheInfo().isResultExist()); assertTrue(czTL.getDownloadCacheInfo().isError()); assertNotNull(czTL.getDownloadCacheInfo().getExceptionMessage()); assertNotNull(czTL.getDownloadCacheInfo().getExceptionStackTrace()); assertFalse(czTL.getParsingCacheInfo().isResultExist()); assertNull(czTL.getParsingCacheInfo().getExceptionMessage()); assertNull(czTL.getParsingCacheInfo().getExceptionStackTrace()); assertFalse(czTL.getValidationCacheInfo().isResultExist()); assertNull(czTL.getValidationCacheInfo().getExceptionMessage()); assertNull(czTL.getValidationCacheInfo().getExceptionStackTrace()); }
@Test public void tlNotParsableTest() { updateTLUrl("src/test/resources/lotlCache/CZ_not-parsable.xml"); TLValidationJobSummary summary = getTLValidationJob().getSummary(); assertEquals(0, summary.getNumberOfProcessedLOTLs()); assertEquals(1, summary.getNumberOfProcessedTLs()); List<TLInfo> tlInfos = summary.getOtherTLInfos(); assertEquals(1, tlInfos.size()); TLInfo czTL = tlInfos.get(0); assertFalse(czTL.getDownloadCacheInfo().isResultExist()); assertTrue(czTL.getDownloadCacheInfo().isError()); assertNotNull(czTL.getDownloadCacheInfo().getExceptionMessage()); assertNotNull(czTL.getDownloadCacheInfo().getExceptionStackTrace()); assertFalse(czTL.getParsingCacheInfo().isResultExist()); assertNull(czTL.getParsingCacheInfo().getExceptionMessage()); assertNull(czTL.getParsingCacheInfo().getExceptionStackTrace()); assertFalse(czTL.getValidationCacheInfo().isResultExist()); assertNull(czTL.getValidationCacheInfo().getExceptionMessage()); assertNull(czTL.getValidationCacheInfo().getExceptionStackTrace()); }
@Test public void tlNotCompliantTest() { updateTLUrl("src/test/resources/lotlCache/CZ_not-compliant.xml"); TLValidationJobSummary summary = getTLValidationJob().getSummary(); assertEquals(0, summary.getNumberOfProcessedLOTLs()); assertEquals(1, summary.getNumberOfProcessedTLs()); List<TLInfo> tlInfos = summary.getOtherTLInfos(); assertEquals(1, tlInfos.size()); TLInfo czTL = tlInfos.get(0); assertTrue(czTL.getDownloadCacheInfo().isResultExist()); assertNull(czTL.getDownloadCacheInfo().getExceptionMessage()); assertNull(czTL.getDownloadCacheInfo().getExceptionStackTrace()); assertFalse(czTL.getParsingCacheInfo().isResultExist()); assertNotNull(czTL.getParsingCacheInfo().getExceptionMessage()); assertNotNull(czTL.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(czTL.getValidationCacheInfo().isResultExist()); assertNull(czTL.getValidationCacheInfo().getExceptionMessage()); assertNull(czTL.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_FAILED, czTL.getValidationCacheInfo().getIndication()); assertEquals(SubIndication.HASH_FAILURE, czTL.getValidationCacheInfo().getSubIndication()); }
@Test public void tlTwoSignaturesTest() { updateTLUrl("src/test/resources/lotlCache/CZ_two-sigs.xml"); TLValidationJobSummary summary = getTLValidationJob().getSummary(); assertEquals(0, summary.getNumberOfProcessedLOTLs()); assertEquals(1, summary.getNumberOfProcessedTLs()); List<TLInfo> tlInfos = summary.getOtherTLInfos(); assertEquals(1, tlInfos.size()); TLInfo czTL = tlInfos.get(0); assertTrue(czTL.getDownloadCacheInfo().isResultExist()); assertNull(czTL.getDownloadCacheInfo().getExceptionMessage()); assertNull(czTL.getDownloadCacheInfo().getExceptionStackTrace()); assertFalse(czTL.getParsingCacheInfo().isResultExist()); assertNotNull(czTL.getParsingCacheInfo().getExceptionMessage()); assertNotNull(czTL.getParsingCacheInfo().getExceptionStackTrace()); assertFalse(czTL.getValidationCacheInfo().isResultExist()); assertNotNull(czTL.getValidationCacheInfo().getExceptionMessage()); assertEquals("Number of signatures must be equal to 1 (currently : 2)", czTL.getValidationCacheInfo().getExceptionMessage()); assertNotNull(czTL.getValidationCacheInfo().getExceptionStackTrace()); assertNull(czTL.getValidationCacheInfo().getIndication()); assertNull(czTL.getValidationCacheInfo().getSubIndication()); }
@Test public void tlNoSignaturesTest() { updateTLUrl("src/test/resources/lotlCache/CZ_no-sig.xml"); TLValidationJobSummary summary = getTLValidationJob().getSummary(); assertEquals(0, summary.getNumberOfProcessedLOTLs()); assertEquals(1, summary.getNumberOfProcessedTLs()); List<TLInfo> tlInfos = summary.getOtherTLInfos(); assertEquals(1, tlInfos.size()); TLInfo czTL = tlInfos.get(0); assertTrue(czTL.getDownloadCacheInfo().isResultExist()); assertNull(czTL.getDownloadCacheInfo().getExceptionMessage()); assertNull(czTL.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(czTL.getParsingCacheInfo().isResultExist()); assertNull(czTL.getParsingCacheInfo().getExceptionMessage()); assertNull(czTL.getParsingCacheInfo().getExceptionStackTrace()); assertFalse(czTL.getValidationCacheInfo().isResultExist()); assertNotNull(czTL.getValidationCacheInfo().getExceptionMessage()); assertEquals("Number of signatures must be equal to 1 (currently : 0)", czTL.getValidationCacheInfo().getExceptionMessage()); assertNotNull(czTL.getValidationCacheInfo().getExceptionStackTrace()); assertNull(czTL.getValidationCacheInfo().getIndication()); assertNull(czTL.getValidationCacheInfo().getSubIndication()); }
@Test public void tlPdfTest() { updateTLUrl("src/test/resources/lotlCache/CZ.pdf"); TLValidationJobSummary summary = getTLValidationJob().getSummary(); List<TLInfo> tlInfos = summary.getOtherTLInfos(); TLInfo czTL = tlInfos.get(0); assertFalse(czTL.getDownloadCacheInfo().isResultExist()); assertNotNull(czTL.getDownloadCacheInfo().getExceptionMessage()); assertNotNull(czTL.getDownloadCacheInfo().getExceptionStackTrace()); assertFalse(czTL.getParsingCacheInfo().isResultExist()); assertNull(czTL.getParsingCacheInfo().getExceptionMessage()); assertNull(czTL.getParsingCacheInfo().getExceptionStackTrace()); assertFalse(czTL.getValidationCacheInfo().isResultExist()); assertNull(czTL.getValidationCacheInfo().getExceptionMessage()); assertNull(czTL.getValidationCacheInfo().getExceptionStackTrace()); }
@Test public void lotlBrokenSigTest() { updateLOTLUrl("src/test/resources/lotlCache/eu-lotl_broken-sig.xml"); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertTrue(lotlInfo.getDownloadCacheInfo().isResultExist()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getParsingCacheInfo().isResultExist()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getValidationCacheInfo().isResultExist()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_FAILED, lotlInfo.getValidationCacheInfo().getIndication()); assertEquals(SubIndication.HASH_FAILURE, lotlInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningCertificate()); }
@Test public void lotlNotParsableTest() { updateLOTLUrl("src/test/resources/lotlCache/eu-lotl_not-parsable.xml"); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(0, lotlInfo.getTLInfos().size()); assertFalse(lotlInfo.getDownloadCacheInfo().isResultExist()); assertNotNull(lotlInfo.getDownloadCacheInfo().getExceptionMessage()); assertNotNull(lotlInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertFalse(lotlInfo.getParsingCacheInfo().isResultExist()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionStackTrace()); assertFalse(lotlInfo.getValidationCacheInfo().isResultExist()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionStackTrace()); }
@Test public void lotlNonCompliantTest() { updateLOTLUrl("src/test/resources/lotlCache/eu-lotl_non-compliant.xml"); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(0, lotlInfo.getTLInfos().size()); assertTrue(lotlInfo.getDownloadCacheInfo().isResultExist()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertFalse(lotlInfo.getParsingCacheInfo().isResultExist()); assertNotNull(lotlInfo.getParsingCacheInfo().getExceptionMessage()); assertNotNull(lotlInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getValidationCacheInfo().isResultExist()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionStackTrace()); }
@Test public void lotlXmlDeclarationRemovedTest() { updateLOTLUrl("src/test/resources/lotlCache/eu-lotl_xml-directive-removed.xml"); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(31, lotlInfo.getTLInfos().size()); assertTrue(lotlInfo.getDownloadCacheInfo().isResultExist()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getParsingCacheInfo().isResultExist()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getValidationCacheInfo().isResultExist()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_PASSED, lotlInfo.getValidationCacheInfo().getIndication()); assertNull(lotlInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningCertificate()); }
@Test public void pivotTest() { updatePivotUrl("src/test/resources/lotlCache/tl_pivot_247_mp.xml"); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(4, lotlInfo.getPivotInfos().size()); assertEquals(31, lotlInfo.getTLInfos().size()); for (PivotInfo pivotInfo : lotlInfo.getPivotInfos()) { assertTrue(pivotInfo.getDownloadCacheInfo().isResultExist()); assertNull(pivotInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(pivotInfo.getParsingCacheInfo().isResultExist()); assertNull(pivotInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(pivotInfo.getValidationCacheInfo().isResultExist()); assertNull(pivotInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_PASSED, pivotInfo.getValidationCacheInfo().getIndication()); assertNull(pivotInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(pivotInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(pivotInfo.getValidationCacheInfo().getSigningCertificate()); assertTrue(Utils.isMapNotEmpty(pivotInfo.getCertificateStatusMap())); assertNotNull(pivotInfo.getLOTLLocation()); } PivotInfo firstPivotInfo = lotlInfo.getPivotInfos().get(0); Map<CertificateToken, CertificatePivotStatus> certificateStatusMap = firstPivotInfo.getCertificateStatusMap(); assertEquals(4, certificateStatusMap.size()); int addedCerts = 0; int staticCerts = 0; int removedCerts = 0; for (CertificatePivotStatus certificatePivotStatus : certificateStatusMap.values()) { switch (certificatePivotStatus) { case ADDED: addedCerts++; break; case NOT_CHANGED: staticCerts++; break; case REMOVED: removedCerts++; break; } } assertEquals(3, addedCerts); assertEquals(1, staticCerts); assertEquals(0, removedCerts); }
@Test public void pivotBrokenSigTest() { updatePivotUrl("src/test/resources/lotlCache/tl_pivot_247_mp_broken-sig.xml"); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(4, lotlInfo.getPivotInfos().size()); assertEquals(31, lotlInfo.getTLInfos().size()); assertTrue(lotlInfo.getDownloadCacheInfo().isResultExist()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getParsingCacheInfo().isResultExist()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getValidationCacheInfo().isResultExist()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_FAILED, lotlInfo.getValidationCacheInfo().getIndication()); assertEquals(SubIndication.HASH_FAILURE, lotlInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningCertificate()); PivotInfo pivotInfo = lotlInfo.getPivotInfos().get(3); assertTrue(pivotInfo.getDownloadCacheInfo().isResultExist()); assertNull(pivotInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(pivotInfo.getParsingCacheInfo().isResultExist()); assertNull(pivotInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(pivotInfo.getValidationCacheInfo().isResultExist()); assertNull(pivotInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_FAILED, pivotInfo.getValidationCacheInfo().getIndication()); assertEquals(SubIndication.HASH_FAILURE, pivotInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(pivotInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(pivotInfo.getValidationCacheInfo().getSigningCertificate()); }
@Test public void intermediatePivotBrokenSigTest() { updatePivotUrl("src/test/resources/lotlCache/tl_pivot_247_mp.xml"); urlMap.put("https: new FileDocument("src/test/resources/lotlCache/tl_pivot_191_mp_broken-sig.xml")); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(4, lotlInfo.getPivotInfos().size()); assertEquals(31, lotlInfo.getTLInfos().size()); assertTrue(lotlInfo.getDownloadCacheInfo().isResultExist()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getParsingCacheInfo().isResultExist()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getValidationCacheInfo().isResultExist()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.INDETERMINATE, lotlInfo.getValidationCacheInfo().getIndication()); assertEquals(SubIndication.NO_CERTIFICATE_CHAIN_FOUND, lotlInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningCertificate()); PivotInfo brokenPivotInfo = lotlInfo.getPivotInfos().get(1); assertTrue(brokenPivotInfo.getDownloadCacheInfo().isResultExist()); assertNull(brokenPivotInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(brokenPivotInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(brokenPivotInfo.getParsingCacheInfo().isResultExist()); assertNull(brokenPivotInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(brokenPivotInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(brokenPivotInfo.getValidationCacheInfo().isResultExist()); assertNull(brokenPivotInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(brokenPivotInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_FAILED, brokenPivotInfo.getValidationCacheInfo().getIndication()); assertEquals(SubIndication.HASH_FAILURE, brokenPivotInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(brokenPivotInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(brokenPivotInfo.getValidationCacheInfo().getSigningCertificate()); PivotInfo firstpivotInfo = lotlInfo.getPivotInfos().get(0); assertTrue(firstpivotInfo.getDownloadCacheInfo().isResultExist()); assertNull(firstpivotInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(firstpivotInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(firstpivotInfo.getParsingCacheInfo().isResultExist()); assertNull(firstpivotInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(firstpivotInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(firstpivotInfo.getValidationCacheInfo().isResultExist()); assertNull(firstpivotInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(firstpivotInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_PASSED, firstpivotInfo.getValidationCacheInfo().getIndication()); assertNull(firstpivotInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(firstpivotInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(firstpivotInfo.getValidationCacheInfo().getSigningCertificate()); }
@Test public void missingPivotTest() { updatePivotUrl("src/test/resources/lotlCache/tl_pivot_247_mp_missing-pivot.xml"); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(4, lotlInfo.getPivotInfos().size()); PivotInfo missingPivotInfo = lotlInfo.getPivotInfos().get(2); assertFalse(missingPivotInfo.getDownloadCacheInfo().isResultExist()); assertNotNull(missingPivotInfo.getDownloadCacheInfo().getExceptionMessage()); assertNotNull(missingPivotInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertFalse(missingPivotInfo.getParsingCacheInfo().isResultExist()); assertNull(missingPivotInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(missingPivotInfo.getParsingCacheInfo().getExceptionStackTrace()); assertFalse(missingPivotInfo.getValidationCacheInfo().isResultExist()); assertNull(missingPivotInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(missingPivotInfo.getValidationCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getDownloadCacheInfo().isResultExist()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getParsingCacheInfo().isResultExist()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getValidationCacheInfo().isResultExist()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_FAILED, lotlInfo.getValidationCacheInfo().getIndication()); assertEquals(SubIndication.HASH_FAILURE, lotlInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningCertificate()); }
@Test public void pivotNoSigTest() { updatePivotUrl("src/test/resources/lotlCache/tl_pivot_247_mp_no-sig.xml"); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(4, lotlInfo.getPivotInfos().size()); PivotInfo pivotInfo = lotlInfo.getPivotInfos().get(3); assertTrue(pivotInfo.getDownloadCacheInfo().isResultExist()); assertNull(pivotInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(pivotInfo.getParsingCacheInfo().isResultExist()); assertNull(pivotInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getParsingCacheInfo().getExceptionStackTrace()); assertFalse(pivotInfo.getValidationCacheInfo().isResultExist()); assertNotNull(pivotInfo.getValidationCacheInfo().getExceptionMessage()); assertNotNull(pivotInfo.getValidationCacheInfo().getExceptionStackTrace()); }
@Test public void intermediatePivotNoSigTest() { updatePivotUrl("src/test/resources/lotlCache/tl_pivot_247_mp.xml"); urlMap.put("https: new FileDocument("src/test/resources/lotlCache/tl_pivot_191_mp_no-sig.xml")); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(4, lotlInfo.getPivotInfos().size()); assertTrue(lotlInfo.getDownloadCacheInfo().isResultExist()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getParsingCacheInfo().isResultExist()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getValidationCacheInfo().isResultExist()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.INDETERMINATE, lotlInfo.getValidationCacheInfo().getIndication()); assertEquals(SubIndication.NO_CERTIFICATE_CHAIN_FOUND, lotlInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningCertificate()); PivotInfo pivotNoSigInfo = lotlInfo.getPivotInfos().get(1); assertTrue(pivotNoSigInfo.getDownloadCacheInfo().isResultExist()); assertNull(pivotNoSigInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(pivotNoSigInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(pivotNoSigInfo.getParsingCacheInfo().isResultExist()); assertNull(pivotNoSigInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(pivotNoSigInfo.getParsingCacheInfo().getExceptionStackTrace()); assertFalse(pivotNoSigInfo.getValidationCacheInfo().isResultExist()); assertNotNull(pivotNoSigInfo.getValidationCacheInfo().getExceptionMessage()); assertNotNull(pivotNoSigInfo.getValidationCacheInfo().getExceptionStackTrace()); PivotInfo firstpivotInfo = lotlInfo.getPivotInfos().get(0); assertTrue(firstpivotInfo.getDownloadCacheInfo().isResultExist()); assertNull(firstpivotInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(firstpivotInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(firstpivotInfo.getParsingCacheInfo().isResultExist()); assertNull(firstpivotInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(firstpivotInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(firstpivotInfo.getValidationCacheInfo().isResultExist()); assertNull(firstpivotInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(firstpivotInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_PASSED, firstpivotInfo.getValidationCacheInfo().getIndication()); assertNull(firstpivotInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(firstpivotInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(firstpivotInfo.getValidationCacheInfo().getSigningCertificate()); }
@Test public void pivotNotParsableTest() { updatePivotUrl("src/test/resources/lotlCache/tl_pivot_247_mp_not-parsable.xml"); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(0, lotlInfo.getPivotInfos().size()); assertFalse(lotlInfo.getDownloadCacheInfo().isResultExist()); assertNotNull(lotlInfo.getDownloadCacheInfo().getExceptionMessage()); assertNotNull(lotlInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertFalse(lotlInfo.getParsingCacheInfo().isResultExist()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionStackTrace()); assertFalse(lotlInfo.getValidationCacheInfo().isResultExist()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionStackTrace()); }
@Test public void intermediatePivotNotParsableTest() { updatePivotUrl("src/test/resources/lotlCache/tl_pivot_247_mp.xml"); urlMap.put("https: new FileDocument("src/test/resources/lotlCache/tl_pivot_191_mp_not-parsable.xml")); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(4, lotlInfo.getPivotInfos().size()); assertTrue(lotlInfo.getDownloadCacheInfo().isResultExist()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getParsingCacheInfo().isResultExist()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getValidationCacheInfo().isResultExist()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.INDETERMINATE, lotlInfo.getValidationCacheInfo().getIndication()); assertEquals(SubIndication.NO_CERTIFICATE_CHAIN_FOUND, lotlInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningCertificate()); PivotInfo pivotNoSigInfo = lotlInfo.getPivotInfos().get(1); assertFalse(pivotNoSigInfo.getDownloadCacheInfo().isResultExist()); assertNotNull(pivotNoSigInfo.getDownloadCacheInfo().getExceptionMessage()); assertNotNull(pivotNoSigInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertFalse(pivotNoSigInfo.getParsingCacheInfo().isResultExist()); assertNull(pivotNoSigInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(pivotNoSigInfo.getParsingCacheInfo().getExceptionStackTrace()); assertFalse(pivotNoSigInfo.getValidationCacheInfo().isResultExist()); assertNull(pivotNoSigInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(pivotNoSigInfo.getValidationCacheInfo().getExceptionStackTrace()); PivotInfo firstpivotInfo = lotlInfo.getPivotInfos().get(0); assertTrue(firstpivotInfo.getDownloadCacheInfo().isResultExist()); assertNull(firstpivotInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(firstpivotInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(firstpivotInfo.getParsingCacheInfo().isResultExist()); assertNull(firstpivotInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(firstpivotInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(firstpivotInfo.getValidationCacheInfo().isResultExist()); assertNull(firstpivotInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(firstpivotInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_PASSED, firstpivotInfo.getValidationCacheInfo().getIndication()); assertNull(firstpivotInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(firstpivotInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(firstpivotInfo.getValidationCacheInfo().getSigningCertificate()); }
@Test public void pivotUTF8WithBomTest() { updatePivotUrl("src/test/resources/lotlCache/tl_pivot_247_mp_with-bom.xml"); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(4, lotlInfo.getPivotInfos().size()); for (PivotInfo pivotInfo : lotlInfo.getPivotInfos()) { assertTrue(pivotInfo.getDownloadCacheInfo().isResultExist()); assertNull(pivotInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(pivotInfo.getParsingCacheInfo().isResultExist()); assertNull(pivotInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(pivotInfo.getValidationCacheInfo().isResultExist()); assertNull(pivotInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_PASSED, pivotInfo.getValidationCacheInfo().getIndication()); assertNull(pivotInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(pivotInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(pivotInfo.getValidationCacheInfo().getSigningCertificate()); } }
@Test public void pivotWithSpacesTest() { updatePivotUrl("src/test/resources/lotlCache/tl_pivot_247_mp_with-spaces.xml"); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(4, lotlInfo.getPivotInfos().size()); for (PivotInfo pivotInfo : lotlInfo.getPivotInfos()) { assertTrue(pivotInfo.getDownloadCacheInfo().isResultExist()); assertNull(pivotInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(pivotInfo.getParsingCacheInfo().isResultExist()); assertNull(pivotInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(pivotInfo.getValidationCacheInfo().isResultExist()); assertNull(pivotInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.TOTAL_PASSED, pivotInfo.getValidationCacheInfo().getIndication()); assertNull(pivotInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(pivotInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(pivotInfo.getValidationCacheInfo().getSigningCertificate()); } }
@Test public void wrongPivotKeystoreTest() throws IOException { updatePivotUrl("src/test/resources/lotlCache/tl_pivot_247_mp_with-spaces.xml"); lotlSource.setCertificateSource(new KeyStoreCertificateSource(new File("src/test/resources/keystore_corrupted.p12"), "PKCS12", "dss-password")); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertEquals(4, lotlInfo.getPivotInfos().size()); for (PivotInfo pivotInfo : lotlInfo.getPivotInfos()) { assertTrue(pivotInfo.getDownloadCacheInfo().isResultExist()); assertNull(pivotInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(pivotInfo.getParsingCacheInfo().isResultExist()); assertNull(pivotInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(pivotInfo.getValidationCacheInfo().isResultExist()); assertNull(pivotInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(pivotInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.INDETERMINATE, pivotInfo.getValidationCacheInfo().getIndication()); assertEquals(SubIndication.NO_CERTIFICATE_CHAIN_FOUND, pivotInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(pivotInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(pivotInfo.getValidationCacheInfo().getSigningCertificate()); } }
@Test public void lotlCorruptedKeystoreTest() throws IOException { updateLOTLUrl("src/test/resources/lotlCache/eu-lotl_original.xml"); lotlSource.setCertificateSource(new KeyStoreCertificateSource(new File("src/test/resources/keystore_corrupted.p12"), "PKCS12", "dss-password")); TLValidationJobSummary summary = getLOTLValidationJob().getSummary(); List<LOTLInfo> tlInfos = summary.getLOTLInfos(); LOTLInfo lotlInfo = tlInfos.get(0); assertTrue(lotlInfo.getDownloadCacheInfo().isResultExist()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getDownloadCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getParsingCacheInfo().isResultExist()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getParsingCacheInfo().getExceptionStackTrace()); assertTrue(lotlInfo.getValidationCacheInfo().isResultExist()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionMessage()); assertNull(lotlInfo.getValidationCacheInfo().getExceptionStackTrace()); assertEquals(Indication.INDETERMINATE, lotlInfo.getValidationCacheInfo().getIndication()); assertEquals(SubIndication.NO_CERTIFICATE_CHAIN_FOUND, lotlInfo.getValidationCacheInfo().getSubIndication()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningTime()); assertNotNull(lotlInfo.getValidationCacheInfo().getSigningCertificate()); }