RevisionManager { public boolean checkIfStale(String experimentName) { final Long revision = getExperimentRevision(experimentName); return revision != null && revision > latestRevision; } RevisionManager(AdvancedDatastore ds); long nextRevision(); void setLatestRevision(Long revision); boolean checkIfAnyStale(); boolean checkIfStale(String experimentName);  }
@Test public void testCheckIfStale() { final RevisionManager revisionManager = new RevisionManager(ds); revisionManager.checkIfStale("foo"); verify(ds).get(eq(ExperimentEntity.class), eq("foo")); }