Add tests for ROOT-6137.