Add tests.
Merge pull request #1 from stanislasrybak/master

Add tests.