Write a method arrayPairwiseSum that takes an int array and returns an array with the
pairwise sums of all the elements.
For example, given the array {1, 2} you would return the array {3}. Given the array {1,
3, 5} you would return the array {4, 8}. (1 + 3 = 4; 3 + 5 = 8).
Note that the input array must have at least 2 elements to be valid. If the passed array is
null or has less than 2 elements, throw an IllegalArgumentException.
You're challenge is to write tests for this problem described above.
Stuck? You may find these lessons helpful: