Added toArray() tests.