@Override
    public Mono<ListResult<CategoryVo>> list(Integer page, Integer size) {
        var listOptions = new ListOptions();
        listOptions.setFieldSelector(FieldSelector.of(
            notEqual("spec.hideFromList", BooleanUtils.TRUE)
        ));
        return client.listBy(Category.class, listOptions,
                PageRequestImpl.of(pageNullSafe(page), sizeNullSafe(size), defaultSort())
            )
            .map(list -> {
                List<CategoryVo> categoryVos = list.get()
                    .map(CategoryVo::from)
                    .collect(Collectors.toList());
                return new ListResult<>(list.getPage(), list.getSize(), list.getTotal(),
                    categoryVos);
            })
            .defaultIfEmpty(new ListResult<>(page, size, 0L, List.of()));
    }
@Test
    void list() {
        ListResult<Category> categories = new ListResult<>(1, 10, 3,
            categories().stream()
                .sorted(CategoryFinderImpl.defaultComparator())
                .toList());
        when(client.listBy(eq(Category.class), any(ListOptions.class), any(PageRequest.class)))
            .thenReturn(Mono.just(categories));
        ListResult<CategoryVo> list = categoryFinder.list(1, 10).block();
        assertThat(list.getItems()).hasSize(3);
        assertThat(list.get().map(categoryVo -> categoryVo.getMetadata().getName()).toList())
            .isEqualTo(List.of("c3", "c2", "hello"));
    }