@Override
    public Mono<SinglePageVo> getByName(String pageName) {
        return client.get(SinglePage.class, pageName)
            .filterWhen(page -> queryPredicate().map(predicate -> predicate.test(page)))
            .flatMap(singlePagePublicQueryService::convertToVo);
    }
@Test
    void getByName() {
        // fix gh-2992
        String fakePageName = "fake-page";
        SinglePage singlePage = new SinglePage();
        singlePage.setMetadata(new Metadata());
        singlePage.getMetadata().setName(fakePageName);
        singlePage.getMetadata().setLabels(Map.of(SinglePage.PUBLISHED_LABEL, "true"));
        singlePage.setSpec(new SinglePage.SinglePageSpec());
        singlePage.getSpec().setOwner("fake-owner");
        singlePage.getSpec().setReleaseSnapshot("fake-release");
        singlePage.getSpec().setPublish(true);
        singlePage.getSpec().setDeleted(false);
        singlePage.getSpec().setVisible(Post.VisibleEnum.PUBLIC);
        singlePage.setStatus(new SinglePage.SinglePageStatus());
        when(client.get(eq(SinglePage.class), eq(fakePageName)))
            .thenReturn(Mono.just(singlePage));

        when(singlePageConversionService.convertToVo(eq(singlePage)))
            .thenReturn(Mono.just(mock(SinglePageVo.class)));

        singlePageFinder.getByName(fakePageName)
            .as(StepVerifier::create)
            .consumeNextWith(page -> assertThat(page).isNotNull())
            .verifyComplete();

        verify(client).get(SinglePage.class, fakePageName);
    }