@RequestMapping(method = RequestMethod.PUT, value = "{id}")
 public Category update(@PathVariable String id, @RequestBody Category category)
     throws CategoryDoesntExistException {
   Category update = categoryService.findOne(Long.valueOf(id));
   update.setName(category.getName());
   return categoryService.save(update);
 }
 @RequestMapping(method = RequestMethod.GET, value = "{id}")
 public Category get(@PathVariable String id) {
   return categoryService.findOne(Long.valueOf(id));
 }