Code refactoring: Polished tests.
Tests: Added missing tests.
Merge branch 't/11753'