diff --git a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java index 39a636298eb..6a7e1127aec 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java @@ -73,19 +73,6 @@ public class EnableCachingIntegrationTests { fooGetSimple(service); } - @Test - public void barServiceWithCacheableInterfaceCglib() { - this.context = new AnnotationConfigApplicationContext(BarConfigCglib.class); - BarService service = this.context.getBean(BarService.class); - Cache cache = getCache(); - - Object key = new Object(); - assertCacheMiss(key, cache); - - Object value = service.getSimple(key); - assertCacheHit(key, value, cache); - } - private void fooGetSimple(FooService service) { Cache cache = getCache(); @@ -210,31 +197,6 @@ public class EnableCachingIntegrationTests { } } - @Configuration - @Import(SharedConfig.class) - @EnableCaching(proxyTargetClass = true) - static class BarConfigCglib { - - @Bean - public BarService barService() { - return new BarServiceImpl(); - } - } - - interface BarService { - @Cacheable(cacheNames = "testCache") - Object getSimple(Object key); - } - - static class BarServiceImpl implements BarService { - - private final AtomicLong counter = new AtomicLong(); - - @Override - public Object getSimple(Object key) { - return this.counter.getAndIncrement(); - } - } @Configuration @Import(SharedConfig.class)