@Test(expected = IllegalArgumentException.class) public void shouldNotAcceptNullArrays() { sortedArrayToBST.transform(null); }
public BinaryNode<Integer> transform(Integer[] sortedArray) { if (sortedArray == null || sortedArray.length == 0) { throw new IllegalArgumentException("You can't use a null or empty array."); } return transformToBST(sortedArray, 0, sortedArray.length - 1); }
SortedArrayToBST { public BinaryNode<Integer> transform(Integer[] sortedArray) { if (sortedArray == null || sortedArray.length == 0) { throw new IllegalArgumentException("You can't use a null or empty array."); } return transformToBST(sortedArray, 0, sortedArray.length - 1); } }
SortedArrayToBST { public BinaryNode<Integer> transform(Integer[] sortedArray) { if (sortedArray == null || sortedArray.length == 0) { throw new IllegalArgumentException("You can't use a null or empty array."); } return transformToBST(sortedArray, 0, sortedArray.length - 1); }  }
SortedArrayToBST { public BinaryNode<Integer> transform(Integer[] sortedArray) { if (sortedArray == null || sortedArray.length == 0) { throw new IllegalArgumentException("You can't use a null or empty array."); } return transformToBST(sortedArray, 0, sortedArray.length - 1); }  BinaryNode<Integer> transform(Integer[] sortedArray); }
SortedArrayToBST { public BinaryNode<Integer> transform(Integer[] sortedArray) { if (sortedArray == null || sortedArray.length == 0) { throw new IllegalArgumentException("You can't use a null or empty array."); } return transformToBST(sortedArray, 0, sortedArray.length - 1); }  BinaryNode<Integer> transform(Integer[] sortedArray);  }