### Question:
TransactionalTopicDraftService implements TopicDraftService, PluginTopicDraftService { @Override @PreAuthorize("isAuthenticated()") public void deleteDraft() { JCUser user = userService.getCurrentUser(); topicDraftDao.deleteByUser(user); } TransactionalTopicDraftService(UserService userService,
                                          TopicDraftDao topicDraftDao,
                                          SecurityContextFacade securityContextFacade,
                                          PermissionEvaluator permissionEvaluator,
                                          PluginLoader pluginLoader); @Override @PreAuthorize("isAuthenticated()") TopicDraft getDraft(); @Override @PreAuthorize("( (not #draft.codeReview) and (not #draft.plugable) " + "and hasPermission(#draft.branchId, 'BRANCH', 'BranchPermission.CREATE_POSTS')) " + "or (#draft.codeReview " + "and hasPermission(#draft.branchId, 'BRANCH', 'BranchPermission.CREATE_CODE_REVIEW')) " + " or #draft.plugable") TopicDraft saveOrUpdateDraft(TopicDraft draft); @Override @PreAuthorize("isAuthenticated()") void deleteDraft();  }### Answer:
@Test public void deleteDraftShouldDeleteDraftIfUserHasOne() { TopicDraft topicDraft = createTopicDraft(); when(topicDraftDao.getForUser(currentUser)).thenReturn(topicDraft); topicDraftService.deleteDraft(); verify(topicDraftDao).deleteByUser(topicDraft.getTopicStarter()); }