@Test
public void shouldParseOrderByMultipleAttributeNameClauses() {

    assertThat(parser.parseOrderBy(tokenize("order by @a1,@a2")), is(orderBy(asc(nameTest("a1")), asc(nameTest("a2")))));
    assertThat(parser.parseOrderBy(tokenize("order by @a1 ascending , @a2 ascending")),
               is(orderBy(asc(nameTest("a1")), asc(nameTest("a2")))));
    assertThat(parser.parseOrderBy(tokenize("order by @a1 descending, @a2 ascending")),
               is(orderBy(desc(nameTest("a1")), asc(nameTest("a2")))));
    assertThat(parser.parseOrderBy(tokenize("order by @a1 ascending , @a2 descending")),
               is(orderBy(asc(nameTest("a1")), desc(nameTest("a2")))));
    assertThat(parser.parseOrderBy(tokenize("order by @a1 descending, @a2 descending")),
               is(orderBy(desc(nameTest("a1")), desc(nameTest("a2")))));
    assertThat(parser.parseOrderBy(tokenize("order by @pre:a1, @pre:a2")),
               is(orderBy(asc(nameTest("pre", "a1")), asc(nameTest("pre", "a2")))));
    assertThat(parser.parseOrderBy(tokenize("order by @a1 ascending, @pre:a2 ascending")),
               is(orderBy(asc(nameTest("a1")), asc(nameTest("pre", "a2")))));
    assertThat(parser.parseOrderBy(tokenize("order by @a1 descending, @pre:a2 ascending")),
               is(orderBy(desc(nameTest("a1")), asc(nameTest("pre", "a2")))));
    assertThat(parser.parseOrderBy(tokenize("order by @a1 ascending, @pre:a2 descending")),
               is(orderBy(asc(nameTest("a1")), desc(nameTest("pre", "a2")))));
    assertThat(parser.parseOrderBy(tokenize("order by @a1 descending, @pre:a2 descending")),
               is(orderBy(desc(nameTest("a1")), desc(nameTest("pre", "a2")))));
}