Add tests for searching functions