Merge pull request #1226 from toopay/unit-tests

Improve Unit tests