ActiveGrammarSet implements ScopedSetObserver<GrammarDocument> { public void addAll(final Collection<GrammarDocument> grams) { grammars.addAll(grams); if (LOGGER.isDebugEnabled()) { LOGGER.debug("added " + grams.size() + " grammar(s) - now containing " + grammars.size()); } } 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 testAddAll() throws Exception { final ActiveGrammarSet set = new ActiveGrammarSet(observer); final Collection<GrammarDocument> documents = new java.util.ArrayList<GrammarDocument>(); documents.add(document1); documents.add(document2); documents.add(document1); set.addAll(documents); final Collection<GrammarDocument> docs = set.getGrammars(); Assert.assertEquals(2, docs.size()); }