@ExecuteOn(TaskExecutors.IO)
    @Get(uri = "/{namespace}")
    @Operation(tags = {"Flows"}, summary = "Retrieve all flows from a given namespace")
    public List<Flow> getFlowsByNamespace(
        @Parameter(description = "Namespace to filter flows") @PathVariable String namespace
    ) throws HttpStatusException {
        return flowRepository.findByNamespace(tenantService.resolveTenant(), namespace);
    }
@SuppressWarnings("unchecked")
    @Test
    void getFlowsByNamespace() throws IOException, URISyntaxException {
        TestsUtils.loads(repositoryLoader, FlowControllerTest.class.getClassLoader().getResource("flows/getflowsbynamespace"));

        List<Flow> flows = client.toBlocking().retrieve(HttpRequest.GET("/api/v1/flows/io.kestra.unittest.flowsbynamespace"), Argument.listOf(Flow.class));
        assertThat(flows.size(), equalTo(2));
        assertThat(flows.stream().map(Flow::getId).toList(), containsInAnyOrder("getbynamespace-test-flow", "getbynamespace-test-flow2"));
    }