registerWidget method
Registers a testable widget and creates its internal GlobalKey.
Call before mounting the widget in the tree. The key is retrieved afterwards with getGlobalKey.
Implementation
void registerWidget(McpMetadataKey key) => _registry.registerWidget(key);