HomeController extends AbstractController { @RequestMapping(value=TgolKeyStore.HOME_URL, method=RequestMethod.GET) @Secured({TgolKeyStore.ROLE_USER_KEY, TgolKeyStore.ROLE_ADMIN_KEY}) public String displayHomePage(Model model) { User user = getCurrentUser(); model.addAttribute( TgolKeyStore.CONTRACT_LIST_KEY, contractSortCommandHelper.prepareContractInfo( user, null, displayOptionFieldsBuilderList, model)); return TgolKeyStore.HOME_VIEW_NAME; } @Autowired  HomeController(ContractSortCommandHelper contractSortCommandHelper,
                          @Qualifier(value = "displayOptionFieldsBuilderList")
                            List<FormFieldBuilder> displayOptionFieldsBuilderList); @RequestMapping(value=TgolKeyStore.HOME_URL, method=RequestMethod.GET) @Secured({TgolKeyStore.ROLE_USER_KEY, TgolKeyStore.ROLE_ADMIN_KEY}) String displayHomePage(Model model);  }
@Test public void testDisplayHomePage() { setUpMockUserAndAuthenticationContext(); assertEquals(HOME_VIEW_NAME, instance.displayHomePage(new ExtendedModelMap())); }