@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); }
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();  }