public void shouldParserOrderByWithMultipleOrderings() {
List<Ordering> orderBy = parser.parseOrderBy(tokens("ORDER BY NAME(tableA) ASC, SCORE(tableB) DESC, LENGTH(tableC.id) ASC"),
typeSystem,
mock(Source.class));
assertThat(orderBy.size(), is(3));
Ordering first = orderBy.get(0);
assertThat(first.getOperand(), is(instanceOf(NodeName.class)));
assertThat(first.order(), is(Order.ASCENDING));
Ordering second = orderBy.get(1);
assertThat(second.getOperand(), is(instanceOf(FullTextSearchScore.class)));
assertThat(second.order(), is(Order.DESCENDING));
Ordering third = orderBy.get(2);
assertThat(third.getOperand(), is(instanceOf(Length.class)));
assertThat(third.order(), is(Order.ASCENDING));
}