diff --git a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingUnitTests.java b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingUnitTests.java index b3129405..39cda78e 100644 --- a/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingUnitTests.java +++ b/spring-geode-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingUnitTests.java @@ -17,10 +17,17 @@ package org.springframework.geode.boot.autoconfigure.caching; import static org.assertj.core.api.Assertions.assertThat; +import javax.annotation.Resource; + import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.apache.geode.cache.Region; +import org.apache.geode.cache.client.ClientCache; +import org.apache.geode.internal.cache.AbstractRegion; +import org.apache.geode.internal.cache.GemFireCacheImpl; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringBootConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; @@ -39,6 +46,8 @@ import example.test.service.TestCacheableService; * * @author John Blum * @see org.junit.Test + * @see org.apache.geode.cache.Region + * @see org.apache.geode.cache.client.ClientCache * @see org.springframework.boot.autoconfigure.SpringBootApplication * @see org.springframework.boot.test.context.SpringBootTest * @see org.springframework.data.gemfire.config.annotation.EnableCachingDefinedRegions @@ -53,11 +62,23 @@ import example.test.service.TestCacheableService; @SuppressWarnings("unused") public class AutoConfiguredCachingUnitTests extends IntegrationTestsSupport { + @Autowired + private ClientCache clientCache; + + @Resource(name = "RandomNumbers") + private Region randomNumbers; + @Autowired private TestCacheableService cacheableService; @Before public void setup() { + + assertThat(this.clientCache).isNotNull(); + assertThat(this.clientCache).isNotInstanceOf(GemFireCacheImpl.class); + assertThat(this.randomNumbers).isNotNull(); + // TODO: Why is AbstractRegion internal!?!?! #argh + assertThat(this.randomNumbers).isNotInstanceOf(AbstractRegion.class); assertThat(this.cacheableService).isNotNull(); assertThat(this.cacheableService.isCacheMiss()).isFalse(); }