(test) Added test for list.toArray.