public void testSpringSubRegionConfiguration() {
assertNotNull("The /Customers/Accounts SubRegion was not properly initialized!", accounts);
assertEquals("Accounts", accounts.getName());
assertEquals("/Customers/Accounts", accounts.getFullPath());
RegionAttributes regionAttributes = accounts.getAttributes();
assertNotNull(regionAttributes);
assertEquals(DataPolicy.PERSISTENT_REPLICATE, regionAttributes.getDataPolicy());
assertEquals(20, regionAttributes.getConcurrencyLevel());
assertTrue(regionAttributes.isDiskSynchronous());
assertTrue(regionAttributes.getIgnoreJTA());
assertFalse(regionAttributes.getIndexMaintenanceSynchronous());
assertEquals(1000, regionAttributes.getInitialCapacity());
assertEquals(Long.class, regionAttributes.getKeyConstraint());
assertEquals(Scope.DISTRIBUTED_ACK, regionAttributes.getScope());
assertTrue(regionAttributes.getStatisticsEnabled());
assertEquals(String.class, regionAttributes.getValueConstraint());
assertNotNull(regionAttributes.getCacheListeners());
assertEquals(1, regionAttributes.getCacheListeners().length);
assertTrue(regionAttributes.getCacheListeners()[0] instanceof SimpleCacheListener);
assertTrue(regionAttributes.getCacheLoader() instanceof SimpleCacheLoader);
assertTrue(regionAttributes.getCacheWriter() instanceof SimpleCacheWriter);
EvictionAttributes evictionAttributes = regionAttributes.getEvictionAttributes();
assertNotNull(evictionAttributes);
assertEquals(EvictionAction.OVERFLOW_TO_DISK, evictionAttributes.getAction());
assertEquals(10000, evictionAttributes.getMaximum());
MembershipAttributes membershipAttributes = regionAttributes.getMembershipAttributes();
assertNotNull(membershipAttributes);
assertNotNull(membershipAttributes.getRequiredRoles());
assertEquals(1, membershipAttributes.getRequiredRoles().size());
assertTrue(membershipAttributes.getRequiredRoles().iterator().next().getName().equalsIgnoreCase("TEST"));
assertEquals(LossAction.LIMITED_ACCESS, membershipAttributes.getLossAction());
assertEquals(ResumptionAction.REINITIALIZE, membershipAttributes.getResumptionAction());
SubscriptionAttributes subscriptionAttributes = regionAttributes.getSubscriptionAttributes();
assertNotNull(subscriptionAttributes);
assertEquals(InterestPolicy.CACHE_CONTENT, subscriptionAttributes.getInterestPolicy());
}