ActiveGrammarSet implements ScopedSetObserver<GrammarDocument> { public Collection<GrammarDocument> getGrammars() { return grammars; } ActiveGrammarSet(final ScopeObserver scopeObserver); void addActiveGrammarSetObserver(
            final ActiveGrammarSetObserver obs); void removeActiveGrammarSetObserver(
            final ActiveGrammarSetObserver obs); int size(); void add(final GrammarDocument grammar); void addAll(final Collection<GrammarDocument> grams); void removeAll(final Collection<GrammarDocument> grams); boolean contains(final GrammarDocument document); Collection<GrammarDocument> getGrammars(); Collection<GrammarType> getGrammarTypes(); Collection<ModeType> getModeTypes(); @Override void scopedSetChange(final ScopedSet<GrammarDocument> set,
            final Collection<GrammarDocument> removed);  }
@Test public void testGetGrammars() throws Exception { final ActiveGrammarSet set = new ActiveGrammarSet(observer); set.add(document1); set.add(document2); final Collection<GrammarDocument> docs = set.getGrammars(); Assert.assertEquals(2, docs.size()); }