add tests for favorite_by function family.