Buggy code:
@ Test public void testReadWriteAttributeExpressionsStandalone ( ) throws Exception { } private void checkAttributeValues ( MBeanServerConnection connection , ObjectName name , String roInt , String undefinedInt , String i , String bigInt , String bigDecimal , String bool , byte [ ] bytes , String dbl , String s , List < String > list , String lng , String type , String tblKey1 , String tblValue1 , String tblKey2 , String tblValue2 ) throws Exception { } @ Test public void testReadWriteAttributeListStandalone ( ) throws Exception { } @ Test public void testReadWriteAttributeListDomain ( ) throws Exception { } private void checkAttributeList ( String [ ] attrNames , AttributeList list , int roInt , int i , BigInteger bi , BigDecimal bd , boolean b , byte [ ] bytes , double d , String s , List < Integer > lst , long l , ModelType type ) { } @ Test public void testReadWriteAttributeListExpressionsStandalone ( ) throws Exception { } private void checkAttributeList ( String [ ] attrNames , AttributeList list , String roInt , String i , String bi , String bd , String b , byte [ ] bytes , String d , String s , List < String > lst , String l , String type ) { } @ Test public void testInvokeOperationStandalone ( ) throws Exception { } @ Test public void testInvokeOperationDomain ( ) throws Exception { } @ Test public void testInvokeOperationExpressionsStandalone ( ) throws Exception { } @ Test public void testAddMethodSingleFixedChild ( ) throws Exception { } @ Test public void testAddMethodSiblingChildren ( ) throws Exception { } @ Test public void testResolveExpressions ( ) throws Exception { } private OpenMBeanOperationInfo findOperation ( MBeanOperationInfo [ ] ops , String name ) { } private OpenMBeanAttributeInfo findAttribute ( MBeanAttributeInfo [ ] attrs , String name ) { } private void assertEqualByteArray ( byte [ ] bytes , byte ... expected ) { } private CompositeData createComplexData ( MBeanServerConnection connection , CompositeType type , int intValue , BigDecimal bigDecimalValue ) throws Exception { } private CompositeData createComplexData ( MBeanServerConnection connection , CompositeType type , String intValue , String bigDecimalValue ) throws Exception { } private void assertMapType ( OpenType < ? > mapType , OpenType < ? > keyType , OpenType < ? > valueType ) { } private void checkComplexTypeInfo ( CompositeType composite , boolean expressions ) { } private void assertAttributeDescription ( MBeanAttributeInfo attribute , String name , String type , String description , boolean readable , boolean writable ) { } private OpenType < ? > assertCompositeType ( CompositeType composite , String name , String type , String description ) { } private OpenType < ? > assertCompositeType ( CompositeType composite , String name , String type , String description , boolean validateType ) { } private static < T > T assertGetFromList ( Class < T > clazz , AttributeList list , String name ) { } private static < T > T assertCast ( Class < T > clazz , Object value ) { } private void checkSameMBeans ( Set < ObjectInstance > instances , Set < ObjectName > objectNames ) { } private void assertContainsNames ( Set < ObjectName > objectNames , ObjectName ... expected ) { } private MBeanServerConnection setupAndGetConnection ( ModelControllerMBeanTestCase . BaseAdditionalInitialization additionalInitialization ) throws Exception { } private static ObjectName createObjectName ( String s ) { } private static class BaseAdditionalInitialization extends AdditionalInitialization { final String launchType ; public BaseAdditionalInitialization ( String launchType ) { } @ Override protected void initializeExtraSubystemsAndModel ( ExtensionRegistry extensionRegistry , Resource rootResource , ManagementResourceRegistration rootRegistration ) { rootResource . getModel ( ) . get ( ModelControllerMBeanTestCase . LAUNCH_TYPE ) . set ( launchType ) ; rootRegistration . registerOperationHandler ( DEFINITION , INSTANCE ) ; } @ Override protected void setupController ( ControllerInitializer controllerInitializer ) { } @ Override protected void addExtraServices ( final ServiceTarget target ) { } String getExtraXml ( ) { } } private static class MBeanInfoAdditionalInitialization extends ModelControllerMBeanTestCase . BaseAdditionalInitialization { private final Extension extension ; public MBeanInfoAdditionalInitialization ( String launchType , Extension extension ) { } @ Override protected void addParsers ( ExtensionRegistry extensionRegistry , XMLMapper xmlMapper ) { } @ Override protected void initializeExtraSubystemsAndModel ( ExtensionRegistry extensionRegistry , Resource rootResource , ManagementResourceRegistration rootRegistration ) { super . initializeExtraSubystemsAndModel ( extensionRegistry , rootResource , rootRegistration ) ; <START_BUG> extension . initialize ( extensionRegistry . getExtensionContext ( "additional" ) ) ; <END_BUG> } String getExtraXml ( ) { } } static class TestExtension implements Extension { static final String NAMESPACE = "urn:jboss:mbean.model.test" ; private final boolean allowExpressions ; public TestExtension ( ) { } public TestExtension ( boolean allowExpressions ) { } @ Override public void initialize ( ExtensionContext context ) { } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } static class TestExtensionParser implements XMLElementReader < List < ModelNode > > { @ Override public void readElement ( XMLExtendedStreamReader reader , List < ModelNode > list ) throws XMLStreamException { } } static class TestSubystemAdd extends AbstractAddStepHandler implements DescriptionProvider { static final ModelControllerMBeanTestCase . TestExtension . TestSubystemAdd INSTANCE = new ModelControllerMBeanTestCase . TestExtension . TestSubystemAdd ( ) ; @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override public ModelNode getModelDescription ( Locale locale ) { } } static class VoidOperationNoParams implements OperationStepHandler , DescriptionProvider { static final ModelControllerMBeanTestCase . TestExtension . VoidOperationNoParams INSTANCE = new ModelControllerMBeanTestCase . TestExtension . VoidOperationNoParams ( ) ; static final String OPERATION_NAME = "void-no-params" ; static final String OPERATION_JMX_NAME = "voidNoParams" ; boolean invoked ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } @ Override public ModelNode getModelDescription ( Locale locale ) { }

Fix:
extension . initialize ( extensionRegistry . getExtensionContext ( "additional" , false ) ) ;