}
public void testCreateRegion2()
{
RegionManager regionManager = new RegionManagerImpl();
((RegionManagerImpl) regionManager).injectDependencies(null, null, null, null, null, new RegionRegistry());
regionManager.setUsingEvictions(true);
regionManager.getRegion(A_B_C, true).setEvictionRegionConfig(config);
regionManager.getRegion(A_B, true).setEvictionRegionConfig(config);
regionManager.getRegion(DEFAULT_REGION, true).setEvictionRegionConfig(config);
List<Region> regions = regionManager.getAllRegions(Region.Type.ANY);
assertEquals("Region size ", 3, regions.size());
assertEquals("Region 0", DEFAULT_REGION, regions.get(0).getFqn());
assertEquals("Region 1 ", A_B, regions.get(1).getFqn());
assertEquals("Region 2 ", A_B_C, regions.get(2).getFqn());
Region region = regionManager.getRegion("/a/b/c/d", false);
assertNotNull("Region ", region);
assertEquals("Region ", A_B_C, region.getFqn());
region = regionManager.getRegion(A_B, false);
assertNotNull("Region ", region);
assertEquals("Region ", A_B, region.getFqn());
region = regionManager.getRegion("/a", false);
// Should be default.
assertNotNull("Region ", region);
assertEquals("Region ", DEFAULT_REGION, region.getFqn());
}