/**
* Check that the cache is not created each time it's retrieved and correctly handle refresh time.
*/
public void testCache() throws XWikiException, InterruptedException, CacheException
{
CacheConfiguration cacheConfigurationGroups = new CacheConfiguration();
cacheConfigurationGroups.setConfigurationId("ldap.groups");
Cache<Map<String, String>> tmpCache = this.ldapUtils.getCache(cacheConfigurationGroups, getContext());
Cache<Map<String, String>> cache = this.ldapUtils.getCache(cacheConfigurationGroups, getContext());
assertSame("Cache is recreated", tmpCache, cache);