Buggy code:
public abstract class AbstractGlobalOperationsTestCase extends AbstractControllerTestBase { private final AccessType expectedRwAttributeAccess ; protected AbstractGlobalOperationsTestCase ( ) { } protected AbstractGlobalOperationsTestCase ( ProcessType processType , AccessType expectedRwAttributeAccess ) { } @ Override protected void initModel ( Resource rootResource , ManagementResourceRegistration rootRegistration ) { GlobalOperationHandlers . registerGlobalOperations ( rootRegistration , processType ) ; <START_BUG> rootRegistration . registerOperationHandler ( SETUP_OP_DEF , new OperationStepHandler ( ) { <END_BUG> @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode model = new ModelNode ( ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem1" , "attr1" ) . add ( 1 ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem1" , "attr1" ) . add ( 2 ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem1" , "type1" , "thing1" , "name" ) . set ( "Name11" ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem1" , "type1" , "thing1" , "value" ) . set ( "201" ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem1" , "type1" , "thing2" , "name" ) . set ( "Name12" ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem1" , "type1" , "thing2" , "value" ) . set ( "202" ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem1" , "type2" , "other" , "name" ) . set ( "Name2" ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "bigdecimal" ) . set ( new BigDecimal ( 100 ) ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "biginteger" ) . set ( new BigInteger ( "101" ) ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "boolean" ) . set ( true ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "bytes" ) . set ( new byte [ ] { 1 , 2 , 3 } ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "double" ) . set ( Double . MAX_VALUE ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "expression" ) . set ( new ValueExpression ( "{expr}" ) ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "int" ) . set ( 102 ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "list" ) . add ( "l1A" ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "list" ) . add ( "l1B" ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "long" ) . set ( Long . MAX_VALUE ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "object" , "value" ) . set ( "objVal" ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "property" ) . set ( new org . jboss . dmr . Property ( "prop1" , new ModelNode ( ) . set ( "value1" ) ) ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "string1" ) . set ( "s1" ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "string2" ) . set ( "s2" ) ; model . get ( "profile" , "profileA" , "subsystem" , "subsystem2" , "type" ) . set ( TYPE ) ; model . get ( "profile" , "profileB" , "name" ) . set ( "Profile<seq2seq4repair_space>B" ) ; model . get ( "profile" , "profileC" , "subsystem" , "subsystem4" ) ; model . get ( "profile" , "profileC" , "subsystem" , "subsystem5" , "name" ) . set ( "Test" ) ; createModel ( context , model ) ; context . stepCompleted ( ) ; } } ) ; ResourceDefinition profileDef = Factory . create ( PathElement . pathElement ( "profile" , "*" ) , new NonResolvingResourceDescriptionResolver ( ) ) . addReadOnlyAttribute ( SimpleAttributeDefinitionBuilder . create ( "name" , STRING , false ) . setMinSize ( 1 ) . build ( ) ) . build ( ) ; ManagementResourceRegistration profileReg = rootRegistration . registerSubModel ( profileDef ) ; ManagementResourceRegistration profileSub1Reg = profileReg . registerSubModel ( new Subsystem1RootResource ( ) ) ; ManagementResourceRegistration profileASub2Reg = profileReg . registerSubModel ( new org . jboss . as . controller . SimpleResourceDefinition ( PathElement . pathElement ( "subsystem" , "subsystem2" ) , new NonResolvingResourceDescriptionResolver ( ) ) ) ; AttributeDefinition longAttr = TestUtils . createAttribute ( "long" , LONG ) ; profileASub2Reg . registerReadWriteAttribute ( longAttr , null , new org . jboss . as . controller . ModelOnlyWriteAttributeHandler ( longAttr ) ) ; ManagementResourceRegistration profileBSub3Reg = profileReg . registerSubModel ( new org . jboss . as . controller . SimpleResourceDefinition ( PathElement . pathElement ( "subsystem" , "subsystem3" ) , new NonResolvingResourceDescriptionResolver ( ) ) ) ; profileSub1Reg . registerOperationHandler ( TestUtils . createOperationDefinition ( "testA1-1" , TestUtils . createAttribute ( "paramA1" , INT ) ) , new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) { } } ) ; profileSub1Reg . registerOperationHandler ( TestUtils . createOperationDefinition ( "testA1-2" , TestUtils . createAttribute ( "paramA2" , STRING ) ) , new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) { } } ) ; profileASub2Reg . registerOperationHandler ( TestUtils . createOperationDefinition ( "testA2" , TestUtils . createAttribute ( "paramB" , LONG ) ) , new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) { } } ) ; ManagementResourceRegistration profileCSub4Reg = profileReg . registerSubModel ( new org . jboss . as . controller . SimpleResourceDefinition ( PathElement . pathElement ( "subsystem" , "subsystem4" ) , new NonResolvingResourceDescriptionResolver ( ) ) ) ;

Fix:
rootRegistration . registerOperationHandler ( SETUP_OPERATION_DEF , new OperationStepHandler ( ) {