Source:
<code>private AdditionalInitialization createRuntimeAdditionalInitialization(final boolean legacyParser) { return new AdditionalInitialization() { @Override protected void setupController(ControllerInitializer controllerInitializer) { controllerInitializer.addSocketBinding("test", 27258); controllerInitializer.addRemoteOutboundSocketBinding("dummy-outbound-socket", "localhost", 6799); controllerInitializer.addRemoteOutboundSocketBinding("other-outbound-socket", "localhost", 1234); } @Override protected void addExtraServices(ServiceTarget target) { AbsolutePathService.addService(ServerEnvironment.CONTROLLER_TEMP_DIR, new File("target/temp" + System.currentTimeMillis()).getAbsolutePath(), target); if (!legacyParser) { ServiceBuilder<?> builder = target.addService(IOServices.WORKER.append("default")); Consumer<XnioWorker> workerConsumer = builder.provides(IOServices.WORKER.append("default")); <START> builder.setInstance(new WorkerService(workerConsumer, null, Xnio.getInstance().createWorkerBuilder().setWorkerIoThreads(2))); <END> builder.install(); } } @Override protected void initializeExtraSubystemsAndModel(ExtensionRegistry extensionRegistry, Resource rootResource, ManagementResourceRegistration rootRegistration, RuntimeCapabilityRegistry capabilityRegistry) { super.initializeExtraSubystemsAndModel(extensionRegistry, rootResource, rootRegistration, capabilityRegistry); Map<String, Class> capabilities = new HashMap<>(); capabilities.put(buildDynamicCapabilityName(IO_WORKER_CAPABILITY_NAME, "default-remoting"), XnioWorker.class); if (legacyParser) { RemotingSubsystemTestUtil.registerIOExtension(extensionRegistry, rootRegistration); } else { capabilities.put(buildDynamicCapabilityName(IO_WORKER_CAPABILITY_NAME, RemotingSubsystemRootResource.WORKER.getDefaultValue().asString()), XnioWorker.class); } AdditionalInitialization.registerServiceCapabilities(capabilityRegistry, capabilities); } }; }</code><technical_language>Instead of null this pass in a simple Supplier of some simple ExecutorService? out of scope for this clean test noise</technical_language>

Target:
private AdditionalInitialization createRuntimeAdditionalInitialization(final boolean legacyParser) { return new AdditionalInitialization() { @Override protected void setupController(ControllerInitializer controllerInitializer) { controllerInitializer.addSocketBinding("test", 27258); controllerInitializer.addRemoteOutboundSocketBinding("dummy-outbound-socket", "localhost", 6799); controllerInitializer.addRemoteOutboundSocketBinding("other-outbound-socket", "localhost", 1234); } @Override protected void addExtraServices(ServiceTarget target) { AbsolutePathService.addService(ServerEnvironment.CONTROLLER_TEMP_DIR, new File("target/temp" + System.currentTimeMillis()).getAbsolutePath(), target); if (!legacyParser) { ServiceBuilder<?> builder = target.addService(IOServices.WORKER.append("default")); Consumer<XnioWorker> workerConsumer = builder.provides(IOServices.WORKER.append("default")); builder.setInstance(new WorkerService(workerConsumer, () -> Executors.newFixedThreadPool(1), Xnio.getInstance().createWorkerBuilder().setWorkerIoThreads(2))); builder.install(); } } @Override protected void initializeExtraSubystemsAndModel(ExtensionRegistry extensionRegistry, Resource rootResource, ManagementResourceRegistration rootRegistration, RuntimeCapabilityRegistry capabilityRegistry) { super.initializeExtraSubystemsAndModel(extensionRegistry, rootResource, rootRegistration, capabilityRegistry); Map<String, Class> capabilities = new HashMap<>(); capabilities.put(buildDynamicCapabilityName(IO_WORKER_CAPABILITY_NAME, "default-remoting"), XnioWorker.class); if (legacyParser) { RemotingSubsystemTestUtil.registerIOExtension(extensionRegistry, rootRegistration); } else { capabilities.put(buildDynamicCapabilityName(IO_WORKER_CAPABILITY_NAME, RemotingSubsystemRootResource.WORKER.getDefaultValue().asString()), XnioWorker.class); } AdditionalInitialization.registerServiceCapabilities(capabilityRegistry, capabilities); } }; }