Added unit tests for node classes.

@danieldahan Some initial unit tests ready for review.

Note, the following minor issues have been fond in the SDK:
- nodeType is not serialized to JSON
Why use the bought.subject? please use bought.subject!, so it is un-wraped :)