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 shouldNotAllowConfigWithEnvironmentsWithSameNames() {
        String content = configWithEnvironments(
                """
                        <environments>
                          <environment name='uat' />
                          <environment name='uat' />
                        </environments>""", CONFIG_SCHEMA_VERSION);

        assertThatThrownBy(() -> xmlLoader.loadConfigHolder(content))
            .as("Should not support 2 environments with the same same")
            .satisfiesAnyOf(
                t -> assertThat(t.getMessage()).contains("Duplicate unique value [uat] declared for identity constraint of element \"environments\"."),
                t -> assertThat(t.getMessage()).contains("Duplicate unique value [uat] declared for identity constraint \"uniqueEnvironmentName\" of element \"environments\".")
            );
    }