Implemented toArray method test