Issue #3311214 by jibran, Anchal_gupta: Replace TestClass with anonymous class in the RecursiveContextualValidatorTest (cherry picked from commit 6cbea8d6)