Sorted array to binary tree in java (maven project)