use of org.globalbioticinteractions.cache.CachedURI in project eol-globi-data by jhpoelen.
the class DatasetWithCacheTest method datasetLastAccessedAt.
private DatasetWithCache datasetLastAccessedAt(String lastAccessed) {
Cache cache = Mockito.mock(Cache.class);
CachedURI cacheURI = Mockito.mock(CachedURI.class);
when(cacheURI.getAccessedAt()).thenReturn(lastAccessed);
when(cache.asMeta(any(URI.class))).thenReturn(cacheURI);
DatasetImpl datasetUncached = new DatasetImpl("some/namespace", URI.create("some:bla"));
return new DatasetWithCache(datasetUncached, cache);
}
Aggregations