MissingLastRevSeeker { @NotNull public Iterable<ClusterNodeInfoDocument> getAllClusters() { return ClusterNodeInfoDocument.all(store); } MissingLastRevSeeker(DocumentStore store, Clock clock); @NotNull Iterable<ClusterNodeInfoDocument> getAllClusters(); @Nullable ClusterNodeInfoDocument getClusterNodeInfo(final int clusterId); @NotNull Iterable<NodeDocument> getCandidates(final long startTime); boolean acquireRecoveryLock(int clusterId, int recoveredBy); void releaseRecoveryLock(int clusterId, boolean success); NodeDocument getRoot(); boolean isRecoveryNeeded(); boolean isRecoveryNeeded(@NotNull ClusterNodeInfoDocument nodeInfo);  }
@Test public void getAllClusterNodes() { assertEquals(0, Iterables.size(seeker.getAllClusters())); ClusterNodeInfo.getInstance(store, NOOP, null, null, 1); assertEquals(1, Iterables.size(seeker.getAllClusters())); ClusterNodeInfo.getInstance(store, NOOP, null, null, 2); assertEquals(2, Iterables.size(seeker.getAllClusters())); }