public GoConfigHolder loadConfigHolder(final String content, Callback callback) throws Exception {
        CruiseConfig configForEdit;
        CruiseConfig config;
        LOGGER.debug("[Config Save] Loading config holder");
        configForEdit = deserializeConfig(content);
        if (callback != null) callback.call(configForEdit);
        config = preprocessAndValidate(configForEdit);

        return new GoConfigHolder(config, configForEdit);
    }
@Test
    void shouldLoadConfigFile() throws Exception {
        CruiseConfig cruiseConfig = xmlLoader.loadConfigHolder(CONFIG).config;
        PipelineConfig pipelineConfig1 = cruiseConfig.pipelineConfigByName(new CaseInsensitiveString("pipeline1"));
        assertThat(pipelineConfig1.size()).isEqualTo(2);
        assertThat(pipelineConfig1.getLabelTemplate()).isEqualTo(PipelineLabel.COUNT_TEMPLATE);

        StageConfig stage1 = pipelineConfig1.get(0);
        assertThat(stage1.name()).isEqualTo(new CaseInsensitiveString("stage1"));
        assertThat(stage1.allBuildPlans().size()).isEqualTo(1);
        assertThat(stage1.requiresApproval()).as("Should require approval").isTrue();
        AdminsConfig admins = stage1.getApproval().getAuthConfig();
        assertThat(admins).contains(new AdminRole(new CaseInsensitiveString("admin")));
        assertThat(admins).contains(new AdminRole(new CaseInsensitiveString("qa_lead")));
        assertThat(admins).contains(new AdminUser(new CaseInsensitiveString("jez")));

        StageConfig stage2 = pipelineConfig1.get(1);
        assertThat(stage2.requiresApproval()).as("Should not require approval").isFalse();

        JobConfig plan = stage1.jobConfigByInstanceName("plan1", true);
        assertThat(plan.name()).isEqualTo(new CaseInsensitiveString("plan1"));
        assertThat(plan.resourceConfigs().resourceNames()).contains("tiger", "lion");
        assertThat(plan.getTabs().size()).isEqualTo(2);
        assertThat(plan.getTabs().first().getName()).isEqualTo("Emma");
        assertThat(plan.getTabs().first().getPath()).isEqualTo("logs/emma/index.html");
        assertThat(pipelineConfig1.materialConfigs().size()).isEqualTo(1);
        shouldBeSvnMaterial(pipelineConfig1.materialConfigs().first());

        PipelineConfig pipelineConfig2 = cruiseConfig.pipelineConfigByName(new CaseInsensitiveString("pipeline2"));
        shouldBeHgMaterial(pipelineConfig2.materialConfigs().first());

        PipelineConfig pipelineConfig3 = cruiseConfig.pipelineConfigByName(new CaseInsensitiveString("pipeline3"));
        MaterialConfig p4Material = pipelineConfig3.materialConfigs().first();
        shouldBeP4Material(p4Material);

        PipelineConfig pipelineConfig4 = cruiseConfig.pipelineConfigByName(new CaseInsensitiveString("pipeline4"));
        shouldBeGitMaterial(pipelineConfig4.materialConfigs().first());
    }