public <T> T fromXmlPartial(String partial, Class<T> o) throws Exception {
        return fromXmlPartial(toInputStream(partial, UTF_8), o);
    }
@Test
    void shouldAllowEmptyOnCancel() throws Exception {
        String buildXmlPartial =
                """
                        <jobs>
                          <job name="functional">
                             <tasks>
                                 <exec command='ls'>
                                     <oncancel/>
                                 </exec>
                              </tasks>
                            </job>
                        </jobs>""";

        JobConfigs jobs = xmlLoader.fromXmlPartial(buildXmlPartial, JobConfigs.class);
        JobConfig job = jobs.first();
        Tasks tasks = job.tasks();
        assertThat(tasks.size()).isEqualTo(1);
        ExecTask execTask = (ExecTask) tasks.get(0);
        assertThat(execTask.cancelTask()).isInstanceOf(NullTask.class);
    }