@Test public void parseMultipleSort() { String sortExpression = "sort ( + employee.name, - company.code) "; SortNodeList sortNodeList = new SortTokenParserAdapter().parse(sortExpression); assertNotNull(sortNodeList); List<SortNode> sortNodes = sortNodeList.getNodes(); assertEquals(2, sortNodes.size()); SortNode sortNode = sortNodes.get(0); assertEquals("employee.name", sortNode.getField()); assertEquals(SortNode.Order.ASC, sortNode.getOrder()); SortNode sortNode2 = sortNodes.get(1); assertEquals("company.code", sortNode2.getField()); assertEquals(SortNode.Order.DESC, sortNode2.getOrder()); }
public SortNodeList parse(String sortExpression) { try { return createParser(sortExpression).parse(); } catch (ParseException | Error e) { throw new SortParsingException(e); } }
SortTokenParserAdapter { public SortNodeList parse(String sortExpression) { try { return createParser(sortExpression).parse(); } catch (ParseException | Error e) { throw new SortParsingException(e); } } }
SortTokenParserAdapter { public SortNodeList parse(String sortExpression) { try { return createParser(sortExpression).parse(); } catch (ParseException | Error e) { throw new SortParsingException(e); } }  }
SortTokenParserAdapter { public SortNodeList parse(String sortExpression) { try { return createParser(sortExpression).parse(); } catch (ParseException | Error e) { throw new SortParsingException(e); } }  SortNodeList parse(String sortExpression); }
SortTokenParserAdapter { public SortNodeList parse(String sortExpression) { try { return createParser(sortExpression).parse(); } catch (ParseException | Error e) { throw new SortParsingException(e); } }  SortNodeList parse(String sortExpression);  }