MPS-19444 - Added a few more tests, polished the implementation a bit
Merge remote-tracking branch 'origin/master' into 3.1/vaclavFixes
Merge remote-tracking branch 'origin/master' into 3.1/vaclavFixes