public CruiseConfig deserializeConfig(String content) throws Exception {
        String md5 = md5Hex(content);
        Element element = parseInputStream(new ByteArrayInputStream(content.getBytes()));
        LOGGER.debug("[Config Save] Updating config cache with new XML");

        CruiseConfig configForEdit = classParser(element, BasicCruiseConfig.class, configCache, new GoCipher(), registry, new ConfigReferenceElements()).parse();
        setMd5(configForEdit, md5);
        configForEdit.setOrigins(new FileConfigOrigin());
        return configForEdit;
    }
@Test
    void shouldLoadTasksWithOnCancel() throws Exception {
        CruiseConfig config = xmlLoader.deserializeConfig(TASKS_WITH_ON_CANCEL);
        JobConfig job = config.jobConfigByName("pipeline1", "mingle", "cardlist", true);

        Task task = job.tasks().findFirstByType(AntTask.class);
        assertThat(task.hasCancelTask()).isTrue();
        assertThat(task.cancelTask()).isEqualTo(new ExecTask("kill.rb", "", "utils"));

        Task task2 = job.tasks().findFirstByType(ExecTask.class);
        assertThat(task2.hasCancelTask()).isFalse();
    }