### Question:
ToDoController { @RequestMapping(value="/items", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ToDoItem addItem(@RequestBody final ToDoItem item) { toDoItemDao.create(item); return item; }  @RequestMapping(value="/items", method = RequestMethod.GET) @ResponseBody String getAll(ModelMap model); @RequestMapping(value="/items", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody ToDoItem addItem(@RequestBody final ToDoItem item); @RequestMapping(value="/items/{id}", method = RequestMethod.DELETE) ResponseEntity<String> deleteItem(@PathVariable("id") long id); @RequestMapping(value="/items", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody ToDoItem updateItem(@RequestBody final ToDoItem item); void setToDoItemDao(ToDoItemDao toDoItemDao);  }### Answer:
@Test public void addNewItem() { ToDoItem item = new ToDoItem(); item.setName("name"); item.setDescription("description"); controller.addItem(item); verify(dao).create(item); }