Buggy code:
public class KernelServices extends ModelTestKernelServices { private final String mainSubsystemName ; private final ExtensionRegistry extensionRegistry ; private static final AtomicInteger counter = new AtomicInteger ( ) ; private KernelServices ( ServiceContainer container , ModelController controller , StringConfigurationPersister persister , ManagementResourceRegistration rootRegistration , OperationValidator operationValidator , String mainSubsystemName , ExtensionRegistry extensionRegistry , ModelVersion legacyModelVersion , boolean successfulBoot , Throwable bootError ) { } static KernelServices create ( String mainSubsystemName , AdditionalInitialization additionalInit , ExtensionRegistry controllerExtensionRegistry , List < ModelNode > bootOperations , ModelTestParser testParser , Extension mainExtension , ModelVersion legacyModelVersion ) throws Exception { ControllerInitializer controllerInitializer = additionalInit . createControllerInitializer ( ) ; PathManagerService pathManager = new PathManagerService ( ) { } ; controllerInitializer . setPathManger ( pathManager ) ; additionalInit . setupController ( controllerInitializer ) ; ServiceContainer container = Factory . create ( ( "test" + ( KernelServices . counter . incrementAndGet ( ) ) ) ) ; ServiceTarget target = container . subTarget ( ) ; List < ModelNode > extraOps = controllerInitializer . initializeBootOperations ( ) ; List < ModelNode > allOps = new ArrayList < ModelNode > ( ) ; if ( extraOps != null ) { allOps . addAll ( extraOps ) ; } allOps . addAll ( bootOperations ) ; StringConfigurationPersister persister = new StringConfigurationPersister ( allOps , testParser ) ; controllerExtensionRegistry . setWriterRegistry ( persister ) ; controllerExtensionRegistry . setPathManager ( pathManager ) ; <START_BUG> ModelTestModelControllerService svc = new TestModelControllerService ( mainExtension , controllerInitializer , additionalInit , controllerExtensionRegistry , persister , additionalInit . isValidateOperations ( ) ) ; <END_BUG> ServiceBuilder < ModelController > builder = target . addService ( JBOSS_SERVER_CONTROLLER , svc ) ; builder . install ( ) ; target . addService ( SERVICE_NAME , pathManager ) . install ( ) ; additionalInit . addExtraServices ( target ) ; svc . waitForSetup ( ) ; ModelController controller = svc . getValue ( ) ; KernelServices kernelServices = new KernelServices ( container , controller , persister , svc . getRootRegistration ( ) , new OperationValidator ( svc . getRootRegistration ( ) ) , mainSubsystemName , controllerExtensionRegistry , legacyModelVersion , svc . isSuccessfulBoot ( ) , svc . getBootError ( ) ) ; return kernelServices ; } @ Override public KernelServices getLegacyServices ( ModelVersion modelVersion ) { } public TransformedOperation transformOperation ( ModelVersion modelVersion , ModelNode operation ) throws OperationFailedException { } public ModelNode readTransformedModel ( ModelVersion modelVersion ) { } public ModelNode executeOperation ( ModelVersion modelVersion , TransformedOperation op ) { } ExtensionRegistry getExtensionRegistry ( ) { } protected void addLegacyKernelService ( ModelVersion modelVersion , KernelServices legacyServices ) { } private ModelNode createSubsystemVersionRegistry ( ModelVersion modelVersion ) { } }

Fix:
ModelTestModelControllerService svc = TestModelControllerService . create ( mainExtension , controllerInitializer , additionalInit , controllerExtensionRegistry , persister , additionalInit . isValidateOperations ( ) ) ;