Fqn fqn2 = Fqn.fromString("/a/b");
Fqn fqn3 = Fqn.fromString("/aop");
List<Region> expected = new ArrayList<Region>(4);
Region region = r.getRegion(DEFAULT_REGION, true);
region.registerContextClassLoader(getClass().getClassLoader());
assertEquals(DEFAULT_REGION, region.getFqn());
expected.add(region);
region = r.getRegion(fqn1, true);
region.registerContextClassLoader(getClass().getClassLoader());
assertEquals(fqn1, region.getFqn());
expected.add(region);
region = r.getRegion(fqn2, true);
region.registerContextClassLoader(getClass().getClassLoader());
assertEquals(fqn2, region.getFqn());
expected.add(region);
region = r.getRegion(fqn3, true);
region.registerContextClassLoader(getClass().getClassLoader());
assertEquals(fqn3, region.getFqn());
expected.add(region);
// should sort these now ...
Collections.sort(expected);
Iterator<Region> expectedRegions = expected.iterator();