QueryParsers { public void addLanguages( QueryParser firstLanguage, QueryParser... additionalLanguages ) { addLanguage(firstLanguage); for (QueryParser language : additionalLanguages) { addLanguage(language); } } QueryParsers( QueryParser... parsers );  QueryParsers( Iterable<QueryParser> parsers ); void addLanguage( QueryParser languageParser ); void addLanguages( QueryParser firstLanguage,
                              QueryParser... additionalLanguages ); void addLanguages( Iterable<QueryParser> languages ); QueryParser removeLanguage( String language ); Collection<QueryParser> removeLanguages( String firstLanguage,
                                                    String... additionalLanguages ); Set<String> getLanguages(); QueryParser getParserFor( String language ); QueryCommand parse( TypeSystem typeSystem,
                               String language,
                               String query ); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString();  }
@Test( expected = IllegalArgumentException.class ) public void shouldNotAllowNullQueryParserReferenceInAddLanguagesMethod() { parsers.addLanguages((QueryParser)null); }
@Test( expected = IllegalArgumentException.class ) public void shouldAllowNullIterableInAddLanguagesMethod() { parsers.addLanguages((Iterable<QueryParser>)null); }