private Mono<ServerResponse> getPostNavigationByName(ServerRequest request) {
        final var name = request.pathVariable("name");
        return postFinder.cursor(name)
            .doOnNext(result -> {
                if (result.getCurrent() == null) {
                    throw new NotFoundException("Post not found");
                }
            })
            .flatMap(result -> ServerResponse.ok().contentType(MediaType.APPLICATION_JSON)
                .bodyValue(result)
            );
    }
@Test
    public void testGetPostNavigationByName() {
        Metadata metadata = new Metadata();
        metadata.setName("test");
        NavigationPostVo navigation = NavigationPostVo.builder()
            .current(PostVo.builder().metadata(metadata).build())
            .build();
        when(postFinder.cursor(anyString()))
            .thenReturn(Mono.just(navigation));

        webClient.get().uri("/posts/{name}/navigation", "test")
            .exchange()
            .expectStatus().isOk()
            .expectHeader().contentType(MediaType.APPLICATION_JSON)
            .expectBody()
            .jsonPath("$.current.metadata.name").isEqualTo("test");

        verify(postFinder).cursor(anyString());
    }