ItemResource { @GetMapping("{id}") public Mono<ItemResponse> getItem(@PathVariable("id") @Id String id) { return Mono.just(ITEM); }  @GetMapping("{id}") Mono<ItemResponse> getItem(@PathVariable("id") @Id String id); @GetMapping Flux<ItemResponse> allItems(); @PutMapping("{id}") Mono<HttpEntity<ItemResponse>> updateItem(@PathVariable("id") @Id String id,
            @RequestBody @Valid ItemUpdateRequest itemUpdate);  }
@Test public void getItem() { webTestClient.get().uri("/items/1").exchange() .expectStatus().isOk() .expectBody() .jsonPath("$.id").isEqualTo("1") .jsonPath("$.description").isEqualTo("main item") .jsonPath("$.attributes.text").isEqualTo("first item") .jsonPath("$.attributes.number").isEqualTo(1) .jsonPath("$.attributes.bool").isEqualTo(true) .jsonPath("$.attributes.decimal").isEqualTo(1.11) .jsonPath("$.attributes.amount").isEqualTo("3.14 EUR") .jsonPath("$.children").isArray() .jsonPath("$.children.length()").isEqualTo(1) .jsonPath("$.children[0].id").isEqualTo("child-1") .jsonPath("$.children[0].description").isEqualTo("first child") .jsonPath("$.children[0].attributes").doesNotExist() .jsonPath("$.children[0].children").doesNotExist() .consumeWith(commonDocumentation()); }