code search for a range, and unit tests. in hope to get a solid understanding about binary search and boundary conditions.