Add test for issue 7110 (closes #7110)
Add test for issue 4099 (closes #4099)
Add test for issue 5217 (closes #5217)
Merge pull request #7291 from skirpichev/add-tests

Add tests for issues 4099, 7110 and 5217