public void testCollectionScopeKeyConstructor() throws Exception
{
Scope[] expected = new Scope[] {};
HashSet<Scope> set = new HashSet<Scope>();
ScopeKey key = new ScopeKey(set);
assertScopeKey(expected, key);
expected = new Scope[] { testScope1 };
set = new HashSet<Scope>();
for (Scope scope : expected)
set.add(scope);
key = new ScopeKey(set);
assertScopeKey(expected, key);
assertEquals(testScope1.getScopeLevel(), key.getMaxScopeLevel());
expected = new Scope[] { testScope1, testScope2, testScope3, testScope4, testScope5 };
set = new HashSet<Scope>();
for (Scope scope : expected)
set.add(scope);
key = new ScopeKey(set);
assertScopeKey(expected, key);
assertEquals(testScope5.getScopeLevel(), key.getMaxScopeLevel());
}