fixed mistakes in BinarySearch and implemented Tests class