Added test for the toArray and size