wrote some unit tests
Merge pull request #2 from AlexandreBeaulne/master

Unit tests