QueryParser implements IQueryParser { @Override public Query parseQuery(String expression) { if (expression == null) { return null; } OqlParser parser = newParser(expression); try { parser.oql(); } catch (RecognitionException e) { e.printStackTrace(); } return parser.getQuery(); }  @Override Map<String, ORI> parseDefine(String expression); @Override Map<String, List<String>> parserSelect(String expression); @Override Filter parseWhere(String expression); @Override List<OrderBy> parseOrder(String expression); @Override Query parseQuery(String expression);  }
@Test public void testUriWithPort() { String inOql = "DEFINE c='http: Query query = queryParser.parseQuery(inOql); String outOql = query.toString(new StringBuilder(), false).toString(); assertEquals(inOql, outOql); }
@Test public void testCasesensitive() throws Exception { String inOql = "DEFINE c='http: Query query = queryParser.parseQuery(inOql); String outOql = query.toString(new StringBuilder(), false).toString(); assertEquals("DEFINE c='http: }