Buggy code:
public class ServerControllerUnitTestCase { private final ServiceContainer container = Factory . create ( ) ; private ModelController controller ; @ Before public void beforeClass ( ) throws Exception { } @ After public void afterClass ( ) { } @ Test public void testInterfacesAlternatives ( ) throws IOException { } @ Test public void testUpdateInterface ( ) throws IOException { } @ Test public void testComplexInterface ( ) throws IOException { } protected void populateCritieria ( final ModelNode model , final ServerControllerUnitTestCase . Nesting nesting , final AttributeDefinition ... excluded ) { } private static class ModelControllerService extends AbstractControllerService { final CountDownLatch latch = new CountDownLatch ( 1 ) ; final ServerControllerUnitTestCase . StringConfigurationPersister persister ; final ControlledProcessState processState ; volatile ManagementResourceRegistration rootRegistration ; volatile Exception error ; ModelControllerService ( final ControlledProcessState processState , final ServerControllerUnitTestCase . StringConfigurationPersister persister ) { } @ Override protected void initModel ( Resource rootResource , ManagementResourceRegistration rootRegistration ) { this . rootRegistration = rootRegistration ; Properties properties = new Properties ( ) ; properties . put ( "jboss.home.dir" , "." ) ; final String hostControllerName = "hostControllerName" ; <START_BUG> final ServerEnvironment environment = new ServerEnvironment ( hostControllerName , properties , new HashMap < String , String > ( ) , null , LaunchType . DOMAIN , null , new org . jboss . as . version . ProductConfig ( Module . getBootModuleLoader ( ) , "." ) ) ; <END_BUG> final ExtensionRegistry extensionRegistry = new ExtensionRegistry ( ProcessType . STANDALONE_SERVER , new org . jboss . as . controller . RunningModeControl ( RunningMode . NORMAL ) ) ; ServerControllerModelUtil . initOperations ( rootRegistration , ServerControllerUnitTestCase . MockRepository . INSTANCE , persister , environment , processState , null , null , extensionRegistry , false , ServerControllerUnitTestCase . MockRepository . INSTANCE , ServerControllerUnitTestCase . MOCK_PATH_MANAGER ) ; } @ Override protected boolean boot ( List < ModelNode > bootOperations , boolean rollbackOnRuntimeFailure ) throws ConfigurationPersistenceException { } @ Override public void start ( StartContext context ) throws StartException { } } static class StringConfigurationPersister extends AbstractConfigurationPersister { private final List < ModelNode > bootOperations ; volatile String marshalled ; public StringConfigurationPersister ( List < ModelNode > bootOperations , XMLElementWriter < ModelMarshallingContext > rootDeparser ) { } @ Override public PersistenceResource store ( ModelNode model , Set < PathAddress > affectedAddresses ) throws ConfigurationPersistenceException { } @ Override public List < ModelNode > load ( ) throws ConfigurationPersistenceException { } private class StringPersistenceResource implements PersistenceResource { private byte [ ] bytes ; private final AbstractConfigurationPersister persister ; StringPersistenceResource ( final ModelNode model , final AbstractConfigurationPersister persister ) throws ConfigurationPersistenceException { } @ Override public void commit ( ) { } @ Override public void rollback ( ) { } } } static ModelNode readResource ( final ModelControllerClient client , final ModelNode address ) { } static void executeForFailure ( final ModelControllerClient client , final ModelNode operation ) { } static ModelNode executeForResult ( final ModelControllerClient client , final ModelNode operation ) { } static final class MockRepository implements ContentRepository , DeploymentFileRepository { static ServerControllerUnitTestCase . MockRepository INSTANCE = new ServerControllerUnitTestCase . MockRepository ( ) ; @ Override public File [ ] getDeploymentFiles ( byte [ ] deploymentHash ) { } @ Override public File getDeploymentRoot ( byte [ ] deploymentHash ) { } @ Override public void deleteDeployment ( byte [ ] deploymentHash ) { } @ 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 PathManagerService MOCK_PATH_MANAGER = new PathManagerService ( ) { } ; private enum Nesting { TOP , ANY , NOT ; } }

Fix:
final ServerEnvironment environment = new ServerEnvironment ( hostControllerName , properties , new HashMap < String , String > ( ) , null , null , LaunchType . DOMAIN , null , new org . jboss . as . version . ProductConfig ( Module . getBootModuleLoader ( ) , "." ) ) ;