Add test for ROOT-6650.