Added unit test to cover extended user toArray.