add test for nearestSearch