Search in sources :

Example 1 with CachedURI

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);
}
Also used : CachedURI(org.globalbioticinteractions.cache.CachedURI) DatasetImpl(org.eol.globi.service.DatasetImpl) CachedURI(org.globalbioticinteractions.cache.CachedURI) URI(java.net.URI) Cache(org.globalbioticinteractions.cache.Cache)

Aggregations

URI (java.net.URI)1 DatasetImpl (org.eol.globi.service.DatasetImpl)1 Cache (org.globalbioticinteractions.cache.Cache)1 CachedURI (org.globalbioticinteractions.cache.CachedURI)1