Adding unit test for issue #525