public FlowWithSource importFlow(String tenantId, String source) {
        return this.importFlow(tenantId, source, false);
    }
@Test
    void importFlow() {
        String source = """
            id: import
            namespace: some.namespace
            tasks:
            - id: task
              type: io.kestra.plugin.core.log.Log
              message: Hello""";
        Flow importFlow = flowService.importFlow("my-tenant", source);

        assertThat(importFlow.getId(), is("import"));
        assertThat(importFlow.getNamespace(), is("some.namespace"));
        assertThat(importFlow.getRevision(), is(1));
        assertThat(importFlow.getTasks().size(), is(1));
        assertThat(importFlow.getTasks().getFirst().getId(), is("task"));

        Optional<FlowWithSource> fromDb = flowRepository.findByIdWithSource("my-tenant", "some.namespace", "import", Optional.empty());
        assertThat(fromDb.isPresent(), is(true));
        assertThat(fromDb.get().getRevision(), is(1));
        assertThat(fromDb.get().getSource(), is(source));

        source = source.replace("id: task", "id: replaced_task");
        importFlow = flowService.importFlow("my-tenant", source);
        assertThat(importFlow.getRevision(), is(2));
        assertThat(importFlow.getTasks().size(), is(1));
        assertThat(importFlow.getTasks().getFirst().getId(), is("replaced_task"));

        fromDb = flowRepository.findByIdWithSource("my-tenant", "some.namespace", "import", Optional.empty());
        assertThat(fromDb.isPresent(), is(true));
        assertThat(fromDb.get().getRevision(), is(2));
        assertThat(fromDb.get().getSource(), is(source));
    }