@Override
    public Flux<CategoryTreeVo> listAsTree() {
        return listAll()
            .collectList()
            .flatMapMany(list -> Flux.fromIterable(listToTree(list, null)));
    }
@Test
    void listAsTree() {
        when(client.listAll(eq(Category.class), any(ListOptions.class), any(Sort.class)))
            .thenReturn(Flux.fromIterable(categoriesForTree()));
        List<CategoryTreeVo> treeVos = categoryFinder.listAsTree().collectList().block();
        assertThat(treeVos).hasSize(1);
    }