Merged the tests and documentation from #4720 to support the changes in [7295].