### Question:
SqlParser { public SqlNode parseQuery() throws SqlParseException { try { return parser.parseSqlStmtEof(); } catch ( Throwable ex ) { if ( ex instanceof PolyphenyDbContextException ) { final String originalSql = parser.getOriginalSql(); if ( originalSql != null ) { ((PolyphenyDbContextException) ex).setOriginalStatement( originalSql ); } } throw parser.normalizeException( ex ); } } private  SqlParser( SqlAbstractParserImpl parser, SqlParserConfig sqlParserConfig ); static SqlParser create( String s ); static SqlParser create( String sql, SqlParserConfig sqlParserConfig ); static SqlParser create( Reader reader, SqlParserConfig sqlParserConfig ); SqlNode parseExpression(); SqlNode parseQuery(); SqlNode parseQuery( String sql ); SqlNode parseStmt(); SqlAbstractParserImpl.Metadata getMetadata(); static ConfigBuilder configBuilder(); static ConfigBuilder configBuilder( SqlParserConfig sqlParserConfig ); static final int DEFAULT_IDENTIFIER_MAX_LENGTH; }### Answer:
@Test public void testParseWithReader() throws Exception { String query = "select * from dual"; SqlParser sqlParserReader = getSqlParser( new StringReader( query ) ); SqlNode node1 = sqlParserReader.parseQuery(); SqlParser sqlParserString = getSqlParser( query ); SqlNode node2 = sqlParserString.parseQuery(); assertEquals( node2.toString(), node1.toString() ); }