@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()); }
public synchronized TLValidationJobSummary getSummary() { return new ValidationJobSummaryBuilder(cacheAccessFactory.getReadOnlyCacheAccess(), trustedListSources, listOfTrustedListSources) .build(); }
TLValidationJob { public synchronized TLValidationJobSummary getSummary() { return new ValidationJobSummaryBuilder(cacheAccessFactory.getReadOnlyCacheAccess(), trustedListSources, listOfTrustedListSources) .build(); } }
TLValidationJob { public synchronized TLValidationJobSummary getSummary() { return new ValidationJobSummaryBuilder(cacheAccessFactory.getReadOnlyCacheAccess(), trustedListSources, listOfTrustedListSources) .build(); }  }
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(); }
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();  }