Add test for filtering by priority
Fix tests