### Question:
WidgetStoreController { @RequestMapping(method = RequestMethod.GET, value = "widget/add") public String viewAddWidgetForm(Model model, @RequestParam String referringPageId) { final Widget widget = new WidgetImpl(); final String view = ViewNames.ADD_WIDGET_FORM; model.addAttribute(ModelKeys.MARKETPLACE, this.preferenceService.getPreference(PortalPreferenceKeys.EXTERNAL_MARKETPLACE_URL)); model.addAttribute(ModelKeys.WIDGET, widget); model.addAttribute(ModelKeys.REFERRING_PAGE_ID, referringPageId); ControllerUtils.addNavItemsToModel(view, model, referringPageId, userService.getAuthenticatedUser()); return view; } @Autowired  WidgetStoreController(WidgetService widgetService, NewWidgetValidator validator, UserService userService,
            PortalPreferenceService preferenceService, TagService tagService, CategoryService categoryService); @RequestMapping(method = RequestMethod.GET) String view(Model model, @RequestParam String referringPageId,
            @RequestParam(required = false, defaultValue = "0") int offset); @RequestMapping(method = RequestMethod.GET, value = "mine") String viewMine(Model model, @RequestParam String referringPageId,
            @RequestParam(required = false, defaultValue = "0") int offset); @RequestMapping(method = RequestMethod.GET, value = "widget/{widgetId}") String viewWidget(Model model, @PathVariable String widgetId, @RequestParam String referringPageId); @RequestMapping(method = RequestMethod.GET, value = "search") String viewSearchResult(Model model, @RequestParam String referringPageId, @RequestParam String searchTerm,
            @RequestParam(required = false, defaultValue = "0") int offset); @RequestMapping(method = RequestMethod.GET, value = "tag") String viewTagResult(Model model, @RequestParam String referringPageId, @RequestParam String keyword,
            @RequestParam(required = false, defaultValue = "0") int offset); @RequestMapping(method = RequestMethod.GET, value = "category") String viewCategoryResult(@RequestParam(required = true) String referringPageId,
            @RequestParam(required = true) String categoryId,
            @RequestParam(required = false, defaultValue = "0") int offset, Model model); @RequestMapping(method = RequestMethod.GET, value = "widget/add") String viewAddWidgetForm(Model model, @RequestParam String referringPageId); @RequestMapping(method = RequestMethod.GET, value = "widget/add/{type}") String viewAddWidgetFormByType(Model model, @RequestParam String referringPageId, @PathVariable String type); @RequestMapping(method = RequestMethod.POST, value = "widget/add") String viewAddWidgetResult(@ModelAttribute WidgetImpl widget, BindingResult results, Model model,
            @RequestParam String referringPageId); @RequestMapping(method = RequestMethod.POST, value = "widget/add/w3c") String viewAddWidgetResultW3c(@ModelAttribute WidgetImpl widget, BindingResult results, Model model,
            @RequestParam String referringPageId); int getPageSize();  }### Answer:
@Test public void startAddWidget() { final Model model = new ExtendedModelMap(); final String view = controller.viewAddWidgetForm(model,REFERRER_ID); assertEquals("View for add widget form", ViewNames.ADD_WIDGET_FORM, view); final Widget widget = (Widget) model.asMap().get(ModelKeys.WIDGET); assertNotNull("New widget in Model", widget); }