diff --git a/spring-data-geode/src/test/java/org/springframework/data/gemfire/CollocatedRegionIntegrationTests.java b/spring-data-geode/src/test/java/org/springframework/data/gemfire/CollocatedRegionsXmlConfigurationIntegrationTests.java
similarity index 61%
rename from spring-data-geode/src/test/java/org/springframework/data/gemfire/CollocatedRegionIntegrationTests.java
rename to spring-data-geode/src/test/java/org/springframework/data/gemfire/CollocatedRegionsXmlConfigurationIntegrationTests.java
index ee6aee23..7aaf01c5 100644
--- a/spring-data-geode/src/test/java/org/springframework/data/gemfire/CollocatedRegionIntegrationTests.java
+++ b/spring-data-geode/src/test/java/org/springframework/data/gemfire/CollocatedRegionsXmlConfigurationIntegrationTests.java
@@ -20,6 +20,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.apache.geode.cache.DataPolicy;
import org.apache.geode.cache.Region;
import org.springframework.beans.factory.annotation.Autowired;
@@ -29,47 +30,49 @@ import org.springframework.data.gemfire.tests.unit.annotation.GemFireUnitTest;
import org.springframework.test.context.junit4.SpringRunner;
/**
- * Integration Tests for JIRA issue SGF-195,concerning collocated cache {@link Region Regions}.
+ * Integration Tests for Apache Geode {@literal collocated} {@link DataPolicy#PARTITION} {@link Region Regions}
+ * using SDG XML configuration.
*
* @author John Blum
* @see org.junit.Test
* @see org.apache.geode.cache.Region
* @see org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport
- * @see org.springframework.data.gemfire.tests.mock.context.GemFireMockObjectsApplicationContextInitializer
+ * @see org.springframework.data.gemfire.tests.unit.annotation.GemFireUnitTest
* @see org.springframework.test.context.ContextConfiguration
* @see org.springframework.test.context.junit4.SpringRunner
- * @link https://jira.springsource.org/browse/SGF-195
+ * @see SGF-195
* @since 1.3.3
*/
@RunWith(SpringRunner.class)
@GemFireUnitTest
@SuppressWarnings("unused")
-public class CollocatedRegionIntegrationTests extends IntegrationTestsSupport {
+public class CollocatedRegionsXmlConfigurationIntegrationTests extends IntegrationTestsSupport {
@Autowired
- @Qualifier("colocatedRegion")
+ @Qualifier("collocatedRegion")
private Region, ?> colocatedRegion;
@Autowired
@Qualifier("sourceRegion")
private Region, ?> sourceRegion;
- protected static void assertRegionExists(String expectedRegionName, Region, ?> region) {
+ private void assertRegionExists(Region, ?> region, String expectedRegionName) {
assertThat(region).isNotNull();
assertThat(region.getName())
- .describedAs("Expected Region with name %1$s; but was %2$s!", expectedRegionName, region.getName())
+ .describedAs("Expected Region with name [%1$s]; but was [%2$s]!", expectedRegionName, region.getName())
.isEqualTo(expectedRegionName);
}
@Test
- public void testRegionsColocated() {
+ public void collocatedRegionsAreConfiguredCorrectly() {
- assertRegionExists("Source", sourceRegion);
- assertRegionExists("Colocated", colocatedRegion);
- assertThat(colocatedRegion.getAttributes()).isNotNull();
- assertThat(colocatedRegion.getAttributes().getPartitionAttributes()).isNotNull();
- assertThat(colocatedRegion.getAttributes().getPartitionAttributes().getColocatedWith()).isEqualTo(sourceRegion.getName());
+ assertRegionExists(this.sourceRegion, "Source");
+ assertRegionExists(this.colocatedRegion, "Collocated");
+ assertThat(this.colocatedRegion.getAttributes()).isNotNull();
+ assertThat(this.colocatedRegion.getAttributes().getPartitionAttributes()).isNotNull();
+ assertThat(this.colocatedRegion.getAttributes().getPartitionAttributes().getColocatedWith())
+ .isEqualTo(this.sourceRegion.getName());
}
}
diff --git a/spring-data-geode/src/test/resources/org/springframework/data/gemfire/CollocatedRegionIntegrationTests-context.xml b/spring-data-geode/src/test/resources/org/springframework/data/gemfire/CollocatedRegionsXmlConfigurationIntegrationTests-context.xml
similarity index 91%
rename from spring-data-geode/src/test/resources/org/springframework/data/gemfire/CollocatedRegionIntegrationTests-context.xml
rename to spring-data-geode/src/test/resources/org/springframework/data/gemfire/CollocatedRegionsXmlConfigurationIntegrationTests-context.xml
index 222adf07..a0e1234d 100644
--- a/spring-data-geode/src/test/resources/org/springframework/data/gemfire/CollocatedRegionIntegrationTests-context.xml
+++ b/spring-data-geode/src/test/resources/org/springframework/data/gemfire/CollocatedRegionsXmlConfigurationIntegrationTests-context.xml
@@ -17,7 +17,7 @@
-
+