@SuppressWarnings( "deprecation" )
@Test
public void shouldBeAbleToExecuteXPathQueryToFindAllNodesOrderingByPath() throws RepositoryException {

    String xpath = "//element(*,nt:base) order by @jcr:path";
    Query query = session.getWorkspace().getQueryManager().createQuery(xpath, Query.XPATH);
    QueryResult result = query.execute();
    validateQuery().rowCount(totalNodeCount).hasColumns(allColumnNames()).validate(query, result);
}