Add tests for findMin and findMax