Add tests for filterByValues and filterByKeys