It's in `cocos2d-x/samples/Cpp/TestCpp/Classes/ExtensionsTest/CocosBuilderTest`.

Yep, I think we could use `dynamic_cast` for now.