Added tests and error checking for splitLongArray