### Question:
WidgetController { @InitBinder public void initBinder(WebDataBinder dataBinder) { dataBinder.setDisallowedFields("entityId"); dataBinder.registerCustomEditor(Category.class, categoryEditor); }  @InitBinder void initBinder(WebDataBinder dataBinder); @RequestMapping(value = "/admin/widgets", method = RequestMethod.GET) String viewWidgets(@RequestParam(required = false, defaultValue = "0") int offset,
                              @RequestParam(required = false) final String action,
                              @RequestParam(required = false) String referringPageId,
                              Model model); @RequestMapping(value = "/admin/widgets/search", method = RequestMethod.GET) String searchWidgets(@RequestParam(required = false) String searchTerm,
                                @RequestParam(required = false) String widgettype,
                                @RequestParam(required = false) String widgetstatus,
                                @RequestParam(required = false, defaultValue = "0") int offset,
                                @RequestParam(required = false) String referringPageId, Model model); @RequestMapping(value = "/admin/widgetdetail/{widgetid}", method = RequestMethod.GET) String viewWidgetDetail(@PathVariable("widgetid") String widgetid,
                                   @RequestParam(required = false) String referringPageId,Model model); @RequestMapping(value = "/admin/widgetdetail/update", method = RequestMethod.POST) String updateWidgetDetail(@ModelAttribute(ModelKeys.WIDGET) Widget widget, BindingResult result,
                                     @ModelAttribute(ModelKeys.TOKENCHECK) String sessionToken,
                                     @RequestParam String token,
                                     @RequestParam(required = false) String referringPageId,
                                     ModelMap modelMap,
                                     SessionStatus status); @ModelAttribute("widgetStatus") WidgetStatus[] getWidgetStatusValues(); void setPreferenceService(PortalPreferenceService preferenceService); void setCategoryService(CategoryService categoryService); void setCategoryEditor(CategoryEditor categoryEditor); int getPageSize();  }### Answer:
@Test public void initBinder() { webDataBinder.setDisallowedFields("entityId"); expectLastCall(); webDataBinder.registerCustomEditor(Category.class, categoryEditor); expectLastCall(); replay(webDataBinder); controller.initBinder(webDataBinder); verify(webDataBinder); }