adding integration test for issue #338