@ExecuteOn(TaskExecutors.IO)
    @Post(uri = "executions/daily")
    @Operation(tags = {"Stats"}, summary = "Get daily statistics for executions")
    public List<DailyExecutionStatistics> dailyStatistics(@Body @Valid StatisticRequest statisticRequest) {
        // @TODO: seems to be converted back to utc by micronaut
        return executionRepository.dailyStatistics(
            statisticRequest.q(),
            tenantService.resolveTenant(),
            statisticRequest.namespace(),
            statisticRequest.flowId(),
            statisticRequest.startDate() != null ? statisticRequest.startDate().withZoneSameInstant(ZoneId.systemDefault()) : null,
            statisticRequest.endDate() != null ? statisticRequest.endDate().withZoneSameInstant(ZoneId.systemDefault()) : null,
            null,
            statisticRequest.state(),
            false);
    }
@Test
    void dailyStatistics() {
        var dailyStatistics = client.toBlocking().retrieve(
            HttpRequest
                .POST("/api/v1/stats/executions/daily", new StatsController.StatisticRequest(null, null, null, ZonedDateTime.now().minusDays(1), ZonedDateTime.now(), null))
                .contentType(MediaType.APPLICATION_JSON),
            Argument.listOf(DailyExecutionStatistics.class)
        );

        assertThat(dailyStatistics, notNullValue());
    }