Binary search class implementation and test case