Fix test for nearest_neighbor