Added test cases for issue #699