Given an array of no more than 100 unique integers sorted in ascending order, arr, and an
integer x, the function returns an integer that meets the following conditions:
• If there is no such a value of j that arr[j] equals x, then return −1.
• Otherwise, return the value of j that arr[j] equals x.
The function throws an Exception for any invalid input, e.g., arr is null, or x is not an integer.
design test cases by applying each of the following black box testing methods
• Input Partitioning
1. list all the combinations of the equivalence classes for input parameters (arr and x)
2. List the test cases you designed to cover all the identified partitions. Test cases might be fewer than the partitions. (partitions covered, arr input, x input, output)
• Output Partitioning
1. List all the partitions (equivalence classes for the output domain)
2. List the test cases you designed to cover all the identified partitions. The test cases might be fewer than the partitions. (partitions covered, arr input, x input, output)
• Boundary Value Robustness Testing
1. Test cases designed based on all combinations of boundary values for arr and x. (arr input, x input, output)