Checkpoints { @SuppressWarnings("unchecked") @NotNull SortedMap<Revision, Info> getCheckpoints() { Document cdoc = store.find(Collection.SETTINGS, ID, 0); SortedMap<Revision, String> data = null; if (cdoc != null) { data = (SortedMap<Revision, String>) cdoc.get(PROP_CHECKPOINT); } SortedMap<Revision, Info> checkpoints = Maps.newTreeMap(StableRevisionComparator.REVERSE); if (data != null) { for (Map.Entry<Revision, String> entry : data.entrySet()) { checkpoints.put(entry.getKey(), Info.fromString(entry.getValue())); } } return checkpoints; } Checkpoints(DocumentNodeStore store); Revision create(long lifetimeInMillis, Map<String, String> info); void release(String checkpoint); @SuppressWarnings("unchecked") @Nullable Revision getOldestRevisionToKeep();  }
@Test public void expiryOverflow() throws Exception { clock.waitUntil(System.currentTimeMillis()); Map<String, String> empty = Collections.emptyMap(); Revision r = Revision.fromString( store.checkpoint(Long.MAX_VALUE, empty)); Checkpoints.Info info = store.getCheckpoints().getCheckpoints().get(r); assertNotNull(info); assertEquals(Long.MAX_VALUE, info.getExpiryTime()); }