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