### Question:
TopicController { @InitBinder public void initBinder(WebDataBinder binder) { binder.registerCustomEditor(String.class, new StringTrimmerEditor(true)); binder.registerCustomEditor(DateTime.class, new DateTimeEditor("dd-MM-yyyy")); } @Autowired  TopicController(TopicModificationService topicModificationService,
                           PostService postService,
                           BranchService branchService,
                           UserService userService,
                           BreadcrumbBuilder breadcrumbBuilder,
                           LocationService locationService,
                           SessionRegistry sessionRegistry,
                           TopicFetchService topicFetchService,
                           TopicDraftService topicDraftService,
                           EntityToDtoConverter converter,
                           RetryTemplate retryTemplate); @InitBinder void initBinder(WebDataBinder binder); @RequestMapping(value = "/topics/new", method = RequestMethod.GET) ModelAndView showNewTopicPage(@RequestParam(BRANCH_ID) Long branchId); @RequestMapping(value = "/topics/new", method = RequestMethod.POST) ModelAndView createTopic(@Valid @ModelAttribute final TopicDto topicDto,
                                    BindingResult result,
                                    @RequestParam(BRANCH_ID) Long branchId); @RequestMapping(value = "/topics/draft", method = RequestMethod.POST) @ResponseBody JsonResponse saveDraft(@Valid @RequestBody TopicDraft topicDraft,
                                  BindingResult result); @RequestMapping(value = "/topics/draft", method = RequestMethod.DELETE) @ResponseBody JsonResponse deleteDraft(); @RequestMapping(value = "/topics/{topicId}", method = RequestMethod.DELETE) ModelAndView deleteTopic(@PathVariable(TOPIC_ID) Long topicId); @RequestMapping(value = "/topics/{topicId}", method = RequestMethod.GET) ModelAndView showTopicPage(WebRequest request, @PathVariable(TOPIC_ID) Long topicId,
                                      @RequestParam(value = "page", defaultValue = "1", required = false) String page); @RequestMapping(value = "/topics/{topicId}/edit", method = RequestMethod.GET) ModelAndView editTopicPage(@PathVariable(TOPIC_ID) Long topicId); @RequestMapping(value = "/topics/{topicId}/edit", method = RequestMethod.POST) ModelAndView editTopic(@Valid @ModelAttribute TopicDto topicDto,
                                  BindingResult result,
                                  @PathVariable(TOPIC_ID) Long topicId); @RequestMapping(value = "/topics/move/json/{topicId}", method = RequestMethod.POST) @ResponseBody JsonResponse moveTopic(@PathVariable(TOPIC_ID) Long topicId,
                          @RequestParam(BRANCH_ID) Long branchId); @RequestMapping(value = "/topics/{topicId}/close") String closeTopic(@PathVariable(TOPIC_ID) Long topicId); @RequestMapping(value = "/topics/{topicId}/open") String openTopic(@PathVariable(TOPIC_ID) Long topicId); static final String TOPIC_ID; static final String BRANCH_ID; static final String BREADCRUMB_LIST; static final String POST_DTO; static final String POLL; }### Answer:
@Test public void initBinder() { WebDataBinder binder = mock(WebDataBinder.class); controller.initBinder(binder); verify(binder).registerCustomEditor(eq(String.class), any(StringTrimmerEditor.class)); }