Added a test case for pull request #9

Added an integration test which covers the bug fixed by #9