### Question:
PostController { @RequestMapping(value = "drafts/{draftId}/delete", method = RequestMethod.GET) @ResponseBody public JsonResponse deleteDraft(@PathVariable Long draftId) throws NotFoundException { postService.deleteDraft(draftId); return new JsonResponse(JsonResponseStatus.SUCCESS); } @Autowired  PostController(PostService postService, BreadcrumbBuilder breadcrumbBuilder,
                          TopicFetchService topicFetchService, TopicModificationService topicModificationService,
                          BBCodeService bbCodeService, LastReadPostService lastReadPostService,
                          UserService userService, LocationService locationService, EntityToDtoConverter converter,
                          RetryTemplate retryTemplate); @InitBinder void initBinder(WebDataBinder binder); @RequestMapping(method = RequestMethod.DELETE, value = "/posts/{postId}") ModelAndView delete(@PathVariable(POST_ID) final Long postId); @RequestMapping(value = "/posts/{postId}/edit", method = RequestMethod.GET) ModelAndView editPage(@PathVariable(POST_ID) Long postId); @RequestMapping(value = "/posts/{postId}/edit", method = RequestMethod.POST) ModelAndView update(@Valid @ModelAttribute PostDto postDto, BindingResult result,
                               @PathVariable(POST_ID) Long postId); @RequestMapping(method = RequestMethod.POST, value = "/posts/{postId}/quote") @ResponseBody JsonResponse getQuote(@PathVariable(POST_ID) Long postId,
                                 @RequestParam("selection") String selection); @RequestMapping(method = RequestMethod.POST, value = "/topics/{topicId}") // ModelAndView create(@RequestParam(value = "page", defaultValue = "1", required = false) String page,
                               @PathVariable(TOPIC_ID) Long topicId,
                               @Valid @ModelAttribute final PostDto postDto,
                               BindingResult result, RedirectAttributes attr); @RequestMapping(method = RequestMethod.GET, value = "/topics/error/{topicId}") ModelAndView errorRedirect(@RequestParam(value = "page", required = false) String page,
                                      @PathVariable(TOPIC_ID) Long topicId, @ModelAttribute @Valid PostDto postDto,
                                      BindingResult result); @RequestMapping(method = RequestMethod.GET, value = "/posts/{postId}") String redirectToPageWithPost(@PathVariable Long postId); @RequestMapping(method = RequestMethod.POST, value = "/posts/bbToHtml") ModelAndView preview(@Valid @ModelAttribute PostDto postDto, BindingResult result); @RequestMapping(method = RequestMethod.POST, value = "/topics/bbToHtml") ModelAndView preview(@Valid @ModelAttribute TopicDto topicDto, BindingResult result); @RequestMapping(method = RequestMethod.GET, value = "/posts/{postId}/voteup") @ResponseBody JsonResponse voteUp(@PathVariable Long postId, HttpServletRequest request); @RequestMapping(method = RequestMethod.GET, value = "/posts/{postId}/votedown") @ResponseBody JsonResponse voteDown(@PathVariable Long postId, HttpServletRequest request); @RequestMapping(value = "/posts/savedraft", method = RequestMethod.POST) @ResponseBody JsonResponse saveDraft(@Valid @RequestBody PostDraftDto postDraftDto, BindingResult result); @RequestMapping(value = "drafts/{draftId}/delete", method = RequestMethod.GET) @ResponseBody JsonResponse deleteDraft(@PathVariable Long draftId); static final String TOPIC_ID; static final String POST_ID; static final String POST_DTO; static final String TOPIC_TITLE; static final String BREADCRUMB_LIST; }### Answer:
@Test public void testDeleteDraft() throws Exception { controller.deleteDraft(1l); verify(postService).deleteDraft(1l); }