lean option returns more suitable types (especially array of RecordIDs)
extract randomness of tests to common.coffee
add full test (avoid randomness)
can order by id