@Test public void testUsingACache(){ RemoteCache<String, String> cache = infinispanServerExtension.hotrod().create(); cache.put("123", "Mickey"); cache.put("456", "Donald"); CachingService cachingService = new CachingService(cache); assertTrue(cachingService.exists("Mickey")); assertTrue(cachingService.exists("Donald")); assertFalse(cachingService.exists("Minie")); }
public boolean exists(String name) { return cache.containsValue(name); }
CachingService { public boolean exists(String name) { return cache.containsValue(name); } }
CachingService { public boolean exists(String name) { return cache.containsValue(name); } CachingService(RemoteCache<String, String> cache);  CachingService(RemoteCacheManager cacheManager); }
CachingService { public boolean exists(String name) { return cache.containsValue(name); } CachingService(RemoteCache<String, String> cache);  CachingService(RemoteCacheManager cacheManager); void storeName(String id, String name); boolean exists(String name); }
CachingService { public boolean exists(String name) { return cache.containsValue(name); } CachingService(RemoteCache<String, String> cache);  CachingService(RemoteCacheManager cacheManager); void storeName(String id, String name); boolean exists(String name);  }