Add tests for issue #325