### Question:
BookController { @DeleteMapping("/{id}") @RouteMeta(permission = "删除图书", module = "图书", mount = true) @GroupRequired public UnifyResponseVO deleteBook(@PathVariable("id") @Positive(message = "{id}") Long id) { BookDO book = bookService.getById(id); if (book == null) { throw new NotFoundException("book not found", 10022); } bookService.deleteById(book.getId()); return ResponseUtil.generateUnifyResponse(12); }  @GetMapping("/{id}") BookDO getBook(@PathVariable(value = "id") @Positive(message = "{id}") Long id); @GetMapping("") List<BookDO> getBooks(); @GetMapping("/search") List<BookDO> searchBook(@RequestParam(value = "q", required = false, defaultValue = "") String q); @PostMapping("") UnifyResponseVO createBook(@RequestBody @Validated CreateOrUpdateBookDTO validator); @PutMapping("/{id}") UnifyResponseVO updateBook(@PathVariable("id") @Positive(message = "{id}") Long id, @RequestBody @Validated CreateOrUpdateBookDTO validator); @DeleteMapping("/{id}") @RouteMeta(permission = "删除图书", module = "图书", mount = true) @GroupRequired UnifyResponseVO deleteBook(@PathVariable("id") @Positive(message = "{id}") Long id);  }### Answer:
@Test public void deleteBook() throws Exception { BookDO bookDO = new BookDO(); bookDO.setTitle(title); bookDO.setAuthor(author); bookDO.setImage(image); bookDO.setSummary(summary); bookMapper.insert(bookDO); this.id = bookDO.getId(); mvc.perform(delete("/v1/book/" + this.id)) .andDo(print()) .andExpect(status().isOk()) .andExpect(MockMvcResultMatchers. jsonPath("$.message").value("删除图书成功")); }