added tests for toArray, jsonSerialize
Merge pull request #8 from cfralick/feature/add-tests

Adding some tests