// curl -X PUT -i http://localhost:8080/todo-app/api/todo/{id} -d
 // '{"text":"TODO Item Text","done":true}'
 @RequestMapping(value = "todo/{id}", method = RequestMethod.PUT)
 @ResponseStatus(HttpStatus.NO_CONTENT)
 public void update(@PathVariable String id, @RequestBody Todo todo) {
   Todo existing = todoService.get(id);
   if (existing == null) throw new NotFoundException();
   existing.setText(todo.getText());
   existing.setDone(todo.isDone());
 }
 // curl -X GET -i http://localhost:8080/todo-app/api/todo/{id}
 @RequestMapping(value = "todo/{id}", method = RequestMethod.GET)
 @ResponseStatus(HttpStatus.OK)
 @ResponseBody
 public Todo todo(@PathVariable String id) {
   Todo todo = todoService.get(id);
   if (todo == null) throw new NotFoundException();
   return todo;
 }