### Question:
BookController { @RequestMapping(method = RequestMethod.GET) public List<Book> getBookList() { return bookService.findAll(); }  @RequestMapping(method = RequestMethod.GET) List<Book> getBookList(); @RequestMapping(value = "/{id}", method = RequestMethod.GET) Book getBook(@PathVariable Long id); @RequestMapping(value = "/create", method = RequestMethod.POST) ResponseEntity<Void> postBook(@RequestBody Book book, UriComponentsBuilder ucBuilder); @RequestMapping(value = "/update", method = RequestMethod.PUT) Book putBook(@RequestBody Book book); @RequestMapping(value = "/delete/{id}", method = RequestMethod.DELETE) Book deleteBook(@PathVariable Long id);  }### Answer:
@Test public void getBookList() throws Exception { mockMvc.perform(get("/book") .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON_UTF8)) .andExpect(jsonPath("$", hasSize(0))); }