public void testGetCacheNameWithMethodCacheNameAndDefault() throws Exception {
final Method barMethod = Foo.class.getMethod("barMethod");
final CacheResult cacheResultAnnotation = barMethod.getAnnotation(CacheResult.class);
final CacheDefaults cacheDefaultsAnnotation = Foo.class.getAnnotation(CacheDefaults.class);
final String cacheName = getCacheName(barMethod, cacheResultAnnotation.cacheName(), cacheDefaultsAnnotation, false);
assertEquals(cacheName, "bar-cache");
}
public void testGetCacheNameWithoutMethodCacheNameWithoutDefault() throws Exception {