Buggy code:
@ RunWith ( Arquillian . class ) public class ParseAndMarshalModelsTestCase { @ Deployment public static Archive < ? > getDeployment ( ) { } private ServiceContainer serviceContainer ; @ Before public void setupServiceContainer ( ) { } @ After public void cleanup ( ) throws Exception { } @ Test public void testStandaloneXml ( ) throws Exception { } @ Test public void testStandaloneHAXml ( ) throws Exception { } private void standaloneXmlTest ( File original ) throws Exception { } @ Test public void testHostXml ( ) throws Exception { } private void hostXmlTest ( final File original ) throws Exception { } @ Test public void testDomainXml ( ) throws Exception { } private void domainXmlTest ( File original ) throws Exception { } private void fixupOSGiStandalone ( ModelNode node1 , ModelNode node2 ) { } private void fixupOSGiDomain ( ModelNode node1 , ModelNode node2 ) { } private String convertToSingleLine ( String value ) { } private void compare ( ModelNode node1 , ModelNode node2 ) { } private ModelNode loadServerModel ( final File file ) throws Exception { final QName rootElement = new QName ( CURRENT . getUriString ( ) , "server" ) ; final StandaloneXml parser = new StandaloneXml ( Module . getBootModuleLoader ( ) , null ) ; final XmlConfigurationPersister persister = new XmlConfigurationPersister ( file , rootElement , parser , parser ) ; for ( Namespace namespace : Namespace . values ( ) ) { if ( namespace != ( Namespace . CURRENT ) ) { persister . registerAdditionalRootElement ( new QName ( namespace . getUriString ( ) , "server" ) , parser ) ; } } final List < ModelNode > ops = persister . load ( ) ; final ModelNode model = new ModelNode ( ) ; final ModelController controller = createController ( model , new ParseAndMarshalModelsTestCase . Setup ( ) { public void setup ( Resource resource , ManagementResourceRegistration rootRegistration ) { ServerControllerModelUtil . updateCoreModel ( model ) ; <START_BUG> ServerControllerModelUtil . initOperations ( rootRegistration , null , persister , null , null , null , false ) ; <END_BUG> } } ) ; final ModelNode caputreModelOp = new ModelNode ( ) ; caputreModelOp . get ( OP_ADDR ) . set ( EMPTY_ADDRESS . toModelNode ( ) ) ; caputreModelOp . get ( OP ) . set ( "capture-model" ) ; final List < ModelNode > toRun = new ArrayList < ModelNode > ( ops ) ; toRun . add ( caputreModelOp ) ; executeOperations ( controller , toRun ) ; persister . store ( model , null ) . commit ( ) ; return model ; } private ModelNode loadHostModel ( final File file ) throws Exception { } private ModelNode loadDomainModel ( File file ) throws Exception { } public ModelController createController ( final ModelNode model , final ParseAndMarshalModelsTestCase . Setup registration ) throws InterruptedException { } private void executeOperations ( ModelController controller , List < ModelNode > ops ) { } private File getOriginalStandaloneXml ( String profile ) { } private File getDomainConfigDir ( ) { } private File getOriginalHostXml ( final String profile ) { } private File getOriginalDomainXml ( final String profile ) { } private void copyFile ( final File src , final File dest ) throws Exception { } private void close ( Closeable closeable ) { } DescriptionProvider getRootDescriptionProvider ( ) { } interface Setup { void setup ( Resource resource , ManagementResourceRegistration rootRegistration ) { } } class ModelControllerService extends AbstractControllerService { private final CountDownLatch latch = new CountDownLatch ( 1 ) ; private final ModelNode model ; private final ParseAndMarshalModelsTestCase . Setup registration ; ModelControllerService ( final ControlledProcessState processState , final ParseAndMarshalModelsTestCase . Setup registration , final ModelNode model ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override protected void boot ( BootContext context ) throws ConfigurationPersistenceException { } protected void initModel ( Resource rootResource , ManagementResourceRegistration rootRegistration ) { } } private static class MockContentRepository implements ContentRepository { private static final ParseAndMarshalModelsTestCase . MockContentRepository INSTANCE = new ParseAndMarshalModelsTestCase . MockContentRepository ( ) ; @ Override public byte [ ] addContent ( InputStream stream ) throws IOException { } @ Override public VirtualFile getContent ( byte [ ] hash ) { } @ Override public boolean hasContent ( byte [ ] hash ) { } @ Override public void removeContent ( byte [ ] hash ) { } } private static class MockFileRepository implements FileRepository { private static final ParseAndMarshalModelsTestCase . MockFileRepository INSTANCE = new ParseAndMarshalModelsTestCase . MockFileRepository ( ) ; @ Override public File getFile ( String relativePath ) { } @ Override public File getConfigurationFile ( String relativePath ) { } @ Override public File [ ] getDeploymentFiles ( byte [ ] deploymentHash ) { } @ Override public File getDeploymentRoot ( byte [ ] deploymentHash ) { } } private static class MockDomainController implements DomainController { public LocalHostControllerInfo getLocalHostInfo ( ) { } public void registerRemoteHost ( ProxyController hostControllerClient ) { } public void unregisterRemoteHost ( String id ) { } public void registerRunningServer ( ProxyController serverControllerClient ) { } public void unregisterRunningServer ( String serverName ) { } public ModelNode getProfileOperations ( String profileName ) { } public FileRepository getLocalFileRepository ( ) { } public FileRepository getRemoteFileRepository ( ) { } public void stopLocalHost ( ) { } } private static class MockVaultReader extends RuntimeVaultReader { } private static class MockLocalDomainControllerAddHandler extends LocalDomainControllerAddHandler { protected MockLocalDomainControllerAddHandler ( ) { } @ Override protected void initializeDomain ( ) { } } private static class MockRemoteDomainControllerAddHandler extends RemoteDomainControllerAddHandler { protected MockRemoteDomainControllerAddHandler ( ) { } @ Override protected void initializeDomain ( OperationContext context , ModelNode remoteDC ) throws OperationFailedException { } } }

Fix:
ServerControllerModelUtil . initOperations ( rootRegistration , null , persister , null , null , null , null , false ) ;