private Mono<ServerResponse> listCategories(ServerRequest request) {
        CategoryPublicQuery query = new CategoryPublicQuery(request.exchange());
        return client.listBy(Category.class, query.toListOptions(), query.toPageRequest())
            .map(listResult -> toAnotherListResult(listResult, CategoryVo::from))
            .flatMap(result -> ServerResponse.ok()
                .contentType(MediaType.APPLICATION_JSON)
                .bodyValue(result)
            );
    }
@Test
    void listCategories() {
        ListResult<Category> listResult = new ListResult<>(List.of());
        when(client.listBy(eq(Category.class), any(ListOptions.class), any(PageRequest.class)))
            .thenReturn(Mono.just(listResult));

        webTestClient.get()
            .uri("/categories?page=1&size=10")
            .exchange()
            .expectStatus().isOk()
            .expectHeader().contentType(MediaType.APPLICATION_JSON)
            .expectBody()
            .jsonPath("$.total").isEqualTo(listResult.getTotal())
            .jsonPath("$.items").isArray();
    }