ItemResource { @PostMapping("process") public String processAllItems(@RequestBody String command) { return "{ \"output\": \"processed\" }"; }  @GetMapping("{id}") ItemResponse getItem(@PathVariable("id") @Id String id); @GetMapping ItemResponse[] allItems(); @PostMapping ResponseEntity<Void> addItem(@RequestBody @Valid ItemUpdateRequest itemUpdate); @PutMapping("{id}") HttpEntity<ItemResponse> updateItem(@PathVariable("id") @Id String id,
            @RequestBody @Valid ItemUpdateRequest itemUpdate); @DeleteMapping("{id}") void deleteItem(@PathVariable("id") @Id String id); @GetMapping("{id}/{child}") ItemResponse getChild(@PathVariable @Id String id,
            @PathVariable("child")
            @Min(value = 1, groups = English.class)
            @Max(value = 2, groups = German.class) String childId); @GetMapping("search") Page<ItemResponse> searchItem(
            @RequestParam("desc") @NotBlank @Size(max = 255) String descMatch,
            @RequestParam(required = false) @Min(10) @Max(100) Integer hint,
            Pageable page); @PostMapping("process") String processAllItems(@RequestBody String command); @PostMapping("{itemId}/process") CommandResult processSingleItem(@PathVariable String itemId,
            @ModelAttribute Command command); @PostMapping("validateMetadata") void validateMetadata(@RequestBody Metadata metadata); @Deprecated @PostMapping("cloneItem") void cloneItem(@RequestBody CloneData data); @GetMapping("media/{id}") HypermediaItemResponse getHypermediaItem(@PathVariable("id") @Id String id,
            @RequestParam(name = "embedded", required = false) Boolean embedded); @GetMapping("resources/{id}") EntityModel<ItemResponse> getItemAsResource(@PathVariable("id") @Id String id); @GetMapping("filtered") List<ItemResponse> getItemWithFilter(@RequestParam String name, Filter filter); @PutMapping("filtered/{id}") void updateItemWithFilter(@PathVariable("id") @Id String id,
            @RequestBody @Valid ItemUpdateRequest itemUpdate, Filter filter);  }
@Test public void processAllItems() throws Exception { mockMvc.perform(post("/items/process") .contentType(MediaType.APPLICATION_JSON) .content("{ \"command\": \"cleanup\" }")) .andExpect(status().isOk()) .andExpect(content().json("{ \"output\": \"processed\" }")) .andDo(commonDocumentation().document( requestFields().requestBodyAsType(Command.class), responseFields().responseBodyAsType(CommandResult.class))); }