Add unit test for _getClosestWithinRange.