Added some tests
Manually merging Fabrice pull request for tests