### Question:
WidgetApi extends AbstractRestApi { @RequestMapping(value = "/{widgetId}/rating", method = RequestMethod.DELETE) public void deleteWidgetRating(@PathVariable String widgetId, HttpServletResponse response) { logger.debug("DELETE WidgetRating received for /api/rest/widgets/{}", widgetId); widgetService.removeWidgetRating(widgetId, userService.getAuthenticatedUser().getId()); response.setStatus(HttpStatus.NO_CONTENT.value()); } @Autowired  WidgetApi(UserService userService,
                     TagService tagService, WidgetService widgetService); @RequestMapping(method = RequestMethod.GET) void getAllWidgets(); @RequestMapping(method = RequestMethod.POST, value = "/{widgetId}/comments") void createWidgetComment(@PathVariable String widgetId,
                                    @RequestParam String text,
                                    HttpServletResponse response); @ResponseBody @RequestMapping(method = RequestMethod.GET, value = "/{widgetId}/comments/{widgetCommentId}") WidgetComment getWidgetComment(@PathVariable String widgetId,
                                          @PathVariable String widgetCommentId); @RequestMapping(method = RequestMethod.POST, value = "/{widgetId}/comments/{widgetCommentId}") void updateWidgetComment(@PathVariable String widgetId,
                                    @PathVariable String widgetCommentId,
                                    @RequestParam String text,
                                    HttpServletResponse response); @RequestMapping(method = RequestMethod.DELETE, value = "/{widgetId}/comments/{widgetCommentId}") void deleteWidgetComment(@PathVariable String widgetId,
                                    @PathVariable String widgetCommentId,
                                    HttpServletResponse response); @RequestMapping(value = "/{widgetId}/rating", method = RequestMethod.DELETE) void deleteWidgetRating(@PathVariable String widgetId,
                                   HttpServletResponse response); @RequestMapping(value = "/{widgetId}/rating", method = RequestMethod.POST) void setWidgetRating(@PathVariable String widgetId,
                                @RequestParam(value = "score") Integer score,
                                HttpServletResponse response); @ResponseBody @RequestMapping(method = RequestMethod.GET, value = "/{widgetId}/users") List<Person> getAllUsers(@PathVariable String widgetId); @RequestMapping(method = RequestMethod.POST, value = "/{widgetId}/tags") void createWidgetTag(@PathVariable String widgetId,
                                @RequestParam String tagText,
                                HttpServletResponse response); @ResponseBody @RequestMapping(method = RequestMethod.GET, value = "/{widgetId}/tags") List<Tag> getTags(@PathVariable String widgetId, HttpServletResponse response); @ResponseBody @RequestMapping(method = RequestMethod.GET, value = "/tags") List<Tag> getAllTags();  }### Answer:
@Test public void deleteWidgetRating() { expect(userService.getAuthenticatedUser()).andReturn(user); widgetService.removeWidgetRating("1", VALID_USER_ID); expectLastCall(); response.setStatus(HttpStatus.NO_CONTENT.value()); replay(userService, widgetService, response); widgetApi.deleteWidgetRating("1", response); verify(widgetService, userService, response); }