Buggy code:
public class HostControllerRegistrationHandler implements ManagementRequestHandlerFactory { private static final ModelNode READ_DOMAIN_MODEL = new ModelNode ( ) ; private final ManagementChannelHandler handler ; private final HostControllerRegistrationHandler . OperationExecutor operationExecutor ; private final DomainController domainController ; private final Executor registrations ; public HostControllerRegistrationHandler ( ManagementChannelHandler handler , DomainController domainController , HostControllerRegistrationHandler . OperationExecutor operationExecutor , Executor registrations ) { } @ Override public ManagementRequestHandler < ? , ? > resolveHandler ( final RequestHandlerChain handlers , final ManagementRequestHeader header ) { } public interface OperationExecutor { ModelNode execute ( ModelNode operation , OperationMessageHandler handler , ModelController . OperationTransactionControl control , OperationAttachments attachments , OperationStepHandler step ) { } } class InitiateRegistrationHandler implements ManagementRequestHandler < Void , HostControllerRegistrationHandler . RegistrationContext > { @ Override public void handleRequest ( final DataInput input , final ActiveOperation . ResultHandler < Void > resultHandler , final ManagementRequestContext < HostControllerRegistrationHandler . RegistrationContext > context ) throws IOException { } } class RegisterSubsystemVersionsHandler implements ManagementRequestHandler < Void , HostControllerRegistrationHandler . RegistrationContext > { @ Override public void handleRequest ( DataInput input , ActiveOperation . ResultHandler < Void > resultHandler , ManagementRequestContext < HostControllerRegistrationHandler . RegistrationContext > context ) throws IOException { } } static class CompleteRegistrationHandler implements ManagementRequestHandler < Void , HostControllerRegistrationHandler . RegistrationContext > { @ Override public void handleRequest ( final DataInput input , final ActiveOperation . ResultHandler < Void > resultHandler , final ManagementRequestContext < HostControllerRegistrationHandler . RegistrationContext > context ) throws IOException { } } class HostRegistrationStepHandler implements OperationStepHandler { private final TransformerRegistry transformerRegistry ; private final HostControllerRegistrationHandler . RegistrationContext registrationContext ; protected HostRegistrationStepHandler ( final TransformerRegistry transformerRegistry , final HostControllerRegistrationHandler . RegistrationContext registrationContext ) { } @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { context . acquireControllerLock ( ) ; if ( domainController . isHostRegistered ( registrationContext . hostName ) ) { final String failureDescription = MESSAGES . slaveAlreadyRegistered ( registrationContext . hostName ) ; registrationContext . failed ( HOST_ALREADY_EXISTS , failureDescription ) ; context . getFailureDescription ( ) . set ( failureDescription ) ; context . stepCompleted ( ) ; return ; } final Resource root = context . readResourceFromRoot ( EMPTY_ADDRESS . append ( PathElement . pathElement ( EXTENSION ) ) , true ) ; final HostInfo hostInfo = registrationContext . hostInfo ; final int major = hostInfo . getManagementMajorVersion ( ) ; final int minor = hostInfo . getManagementMinorVersion ( ) ; final int micro = hostInfo . getManagementMicroVersion ( ) ; boolean as711 = ( major == 1 ) && ( minor == 1 ) ; if ( as711 ) { final OperationFailedException failure = HostControllerMessages . MESSAGES . unsupportedManagementVersionForHost ( major , minor , 1 , 2 ) ; registrationContext . failed ( failure ) ; throw failure ; } final TransformationTarget target = TransformationTargetImpl . create ( transformerRegistry , ModelVersion . create ( major , minor , micro ) , Collections . < PathAddress , ModelVersion > emptyMap ( ) , hostInfo , HOST ) ; final Transformers transformers = Factory . create ( target ) ; final ModelNode extensions = new ModelNode ( ) ; <START_BUG> final Resource transformed = transformers . transformResource ( Factory . getTransformationContext ( target , context ) , root ) ; <END_BUG> final Collection < Resource . ResourceEntry > resources = transformed . getChildren ( EXTENSION ) ; for ( final Resource . ResourceEntry entry : resources ) { extensions . add ( entry . getName ( ) ) ; } if ( ! ( extensions . isDefined ( ) ) ) { throw new OperationFailedException ( extensions ) ; } registrationContext . processSubsystems ( transformers , extensions ) ; final ReadMasterDomainModelHandler handler = new ReadMasterDomainModelHandler ( transformers ) ; context . addStep ( HostControllerRegistrationHandler . READ_DOMAIN_MODEL , handler , MODEL ) ; context . stepCompleted ( ) ; } } private class RegistrationContext implements ModelController . OperationTransactionControl , ActiveOperation . CompletedCallback < Void > { private final TransformerRegistry transformerRegistry ; private String hostName ; private HostInfo hostInfo ; private ManagementRequestContext < HostControllerRegistrationHandler . RegistrationContext > responseChannel ; private volatile HostControllerRegistrationHandler . IOTask < ? > task ; private volatile boolean failed ; private volatile Transformers transformers ; private ActiveOperation < Void , HostControllerRegistrationHandler . RegistrationContext > activeOperation ; private final AtomicBoolean completed = new AtomicBoolean ( ) ; private RegistrationContext ( TransformerRegistry transformerRegistry ) { } private synchronized void initialize ( final String hostName , final ModelNode hostInfo , final ManagementRequestContext < HostControllerRegistrationHandler . RegistrationContext > responseChannel ) { } @ Override public void completed ( Void result ) { } @ Override public void failed ( Exception e ) { } @ Override public void cancelled ( ) { } @ Override public void operationPrepared ( final ModelController . OperationTransaction transaction , final ModelNode result ) { } private void processRegistration ( ) { } private void processSubsystems ( final Transformers transformers , final ModelNode extensions ) throws OperationFailedException { } protected void setSubsystems ( final ModelNode resolved , final ManagementRequestContext < HostControllerRegistrationHandler . RegistrationContext > responseChannel ) { } void registerHost ( final ModelController . OperationTransaction transaction , final ModelNode result ) throws SlaveRegistrationException { } void completeRegistration ( final ManagementRequestContext < HostControllerRegistrationHandler . RegistrationContext > responseChannel , boolean commit ) { } void failed ( SlaveRegistrationException . ErrorCode errorCode , String message ) { } void failed ( byte errorCode , String message ) { } void sendCompletedMessage ( ) { } Long getRemoteConnectionId ( ) { } protected boolean completeTask ( Object result ) { } protected < T > T executeBlocking ( final HostControllerRegistrationHandler . IOTask < T > task ) { } } abstract static class IOTask < T > extends AsyncFutureTask < T > { IOTask ( ) { } abstract void sendMessage ( final FlushableDataOutput output ) throws IOException { } @ SuppressWarnings ( "unchecked" ) boolean completeStep ( Object result ) { } boolean setFailed ( ) { } }

Fix:
final Resource transformed = transformers . transformRootResource ( context , root ) ;