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 shouldNotAllowConfigWithInvalidName() {
        String content = configWithEnvironments(
                """
                        <environments>
                          <environment name='exclamation is invalid !' />
                        </environments>""", CONFIG_SCHEMA_VERSION);

        assertThatThrownBy(() -> xmlLoader.loadConfigHolder(content))
            .as("XSD should not allow invalid characters")
            .hasMessageContaining("\"exclamation is invalid !\" should conform to the pattern - [a-zA-Z0-9_\\-]{1}[a-zA-Z0-9_\\-.]*");
    }