Add unit-tests for pull request #174