Added unit tests.
Merge pull request #113 from darkowlzz/test

Added unit tests for tree.