Merge pull request #1153 from tiyowan/feature/unit-tests

Fix issue #1148