HomeController { @RequestMapping(value = "auth/home", method = RequestMethod.GET) public String home(Locale locale, Model model, Principal principal) throws QuadrigaStorageException { Date date = new Date(); DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); String formattedDate = dateFormat.format(date); String sUserId = principal.getName(); if (sUserId.trim().equalsIgnoreCase("admin")) { userManager.insertQuadrigaAdminUser(sUserId); } model.addAttribute("username", sUserId); model.addAttribute("serverTime", formattedDate); model.addAttribute("wbmsg", messages.getProperty("workbench_desc")); model.addAttribute("conceptmsg", messages.getProperty("concept_desc")); model.addAttribute("dictmsg", messages.getProperty("dictonary_desc")); model.addAttribute("networksmsg", messages.getProperty("network_desc")); List<IProject> recentProjects = projectManager.getRecentProjectList(sUserId); model.addAttribute("projects", recentProjects); return "auth/home"; }  @ModelAttribute("ServiceBackBean") ServiceBackBean getServiceBackBean(); @RequestMapping(value = "auth/home", method = RequestMethod.GET) String home(Locale locale, Model model, Principal principal); @RequestMapping(value = "auth/about", method = RequestMethod.GET) String aboutQuadriga(Locale locale, Model model, Principal principal); @RequestMapping(value = "auth/profile", method = RequestMethod.GET) String showProfile(Model model, Principal principal); @RequestMapping(value = "auth/profile/addnew", method = RequestMethod.GET) String showSearchForm(Model model, Principal principal,
            @ModelAttribute("ServiceBackBean") ServiceBackBean serviceBackBean); @RequestMapping(value = "auth/profile/search", method = RequestMethod.GET) String search(Model model, Principal principal,
            @ModelAttribute("ServiceBackBean") ServiceBackBean serviceBackBean); @RequestMapping(value = "/auth/profile/delete", method = RequestMethod.POST) String deleteSearchResult(
            @ModelAttribute("SearchResultBackBeanForm") SearchResultBackBeanForm searchResultBackBeanForm,
            Principal principal, Model model); @RequestMapping(value = "auth/profile/{serviceid}/{term}/add", method = RequestMethod.POST) String addSearchResult(
            @ModelAttribute("ServiceBackBean") ServiceBackBean serviceBackBean,
            @ModelAttribute("SearchResultBackBeanForm") SearchResultBackBeanForm searchResultBackBeanForm,
            BindingResult result, @PathVariable("serviceid") String serviceid,
            @PathVariable("term") String term, Model model, Principal principal);  }
@Test public void homeTest() throws QuadrigaStorageException { assertEquals("auth/home", homeController.home(new Locale("us"), model, principal)); assertEquals(principal.getName(), ((ModelMap)model).get("username")); }