Adding unit test for pull request #2548