DdlParsers { public Set<DdlParser> getParsers() { return new HashSet<DdlParser>(this.parsers); } DdlParsers();  DdlParsers( List<DdlParser> parsers ); DdlParser getParser( final String id ); Set<DdlParser> getParsers(); AstNode parseUsing( final String ddl,
                               final String parserId ); List<ParsingResult> parseUsing( final String ddl,
                                           final String firstParserId,
                                           final String secondParserId,
                                           final String... additionalParserIds ); List<ParsingResult> parseUsingAll( final String ddl ); AstNode parse( final String ddl,
                          final String fileName ); static final List<DdlParser> BUILTIN_PARSERS; }
@Test public void shouldReturnBuiltInParsers() { printTest("shouldReturnBuiltInParsers()"); assertThat(this.parsers.getParsers(), hasItems(DdlParsers.BUILTIN_PARSERS.toArray(new DdlParser[DdlParsers.BUILTIN_PARSERS.size()]))); }
@Test public void shouldReturnParsersConstructedWith() { printTest("shouldReturnParsersConstructedWith()"); final List<DdlParser> myParsers = new ArrayList<DdlParser>(); myParsers.add(new DerbyDdlParser()); final DdlParsers ddlParsers = new DdlParsers(myParsers); assertThat(ddlParsers.getParsers(), hasItems(myParsers.toArray(new DdlParser[myParsers.size()]))); }