Use ExtensionRegistry::setAttributeForTest() instead of Reflection