Fixes to TestCaseTest.
Merge pull request #16426 from tgxworld/fix_false_positive

Fixes to TestCaseTest.