@Test
public void shouldBeAbleToCreateAndExecuteJcrSql2QueryWithOrderByOnResidualColumnAndNoAlias() throws RepositoryException {

    String sql = "SELECT * FROM [nt:unstructured] ORDER BY propC";
    Query query = session.getWorkspace().getQueryManager().createQuery(sql, Query.JCR_SQL2);
    QueryResult result = query.execute();
    String[] columnNames = allOf(allColumnNames("nt:unstructured"), new String[] {"propC"});
    validateQuery().rowCount(24).warnings(1).hasColumns(columnNames).validate(query, result);
}