Added unit tests
Merge pull request #13 from mickaelandrieu/add-tests

Added unit tests