@Override
    public void initCoreModel(
        Resource rootResource,
        ManagementResourceRegistration rootRegistration,
        Resource modelControllerResource) {
      VersionModelInitializer.registerRootResource(rootResource, null);
      final HostControllerEnvironment env = createHostControllerEnvironment();
      final LocalHostControllerInfoImpl info = createLocalHostControllerInfo(env);
      final IgnoredDomainResourceRegistry ignoredRegistry = new IgnoredDomainResourceRegistry(info);
      final ExtensibleConfigurationPersister persister = new NullConfigurationPersister();
      final HostFileRepository hostFileRepository = createHostFileRepository();
      final DomainController domainController = new MockDomainController();

      DomainRootDefinition domainDefinition =
          new DomainRootDefinition(
              domainController,
              env,
              persister,
              injectedContentRepository.getValue(),
              hostFileRepository,
              true,
              info,
              extensionRegistry,
              null,
              pathManagerService,
              null,
              authorizer,
              null,
              getMutableRootResourceRegistrationProvider());
      domainDefinition.initialize(rootRegistration);
      rootResourceDefinition.setDelegate(domainDefinition);

      HostModelUtil.createRootRegistry(
          rootRegistration,
          env,
          ignoredRegistry,
          new HostModelRegistrar() {

            @Override
            public void registerHostModel(String hostName, ManagementResourceRegistration root) {}
          },
          processType,
          authorizer,
          modelControllerResource);

      CoreManagementResourceDefinition.registerDomainResource(rootResource, null);
    }
 void setDelegate(DomainRootDefinition delegate, ManagementResourceRegistration root) {
   this.delegate = delegate;
   delegate.initialize(root);
 }