Binary Search implemented with tests.