@GetMapping(value = "/{id}")
    public Mono<Post> get(@PathVariable(value = "id") Long id) {
        return this.posts.findById(id);
    }
@Test
    public void getPostById() throws Exception {
        this.rest
            .get()
            .uri("/posts/1")
            .accept(APPLICATION_JSON)
            .exchange()
            .expectBody()
            .jsonPath("$.title")
            .isEqualTo("post one");
        
        this.rest
            .get()
            .uri("/posts/2")
            .accept(APPLICATION_JSON)
            .exchange()
            .expectBody()
            .jsonPath("$.title")
            .isEqualTo("post two");
    }