Adding tests for #1013
Merge pull request #1066 from bitovi/tests-1013

Adding tests for issue #1013