Implement junit test cases for NearestStrategy