### Question:
UserController { @RequestMapping(value = "/list", method = RequestMethod.GET) public String list(Model model) { logger.info("Populating model with list..."); model.addAttribute("users", userService.findAll()); return "users/list"; }  @Autowired void setUserService(UserService userService); @RequestMapping(value = "/list", method = RequestMethod.GET) String list(Model model); @RequestMapping(value = "/{id:[\\d]*}", method = RequestMethod.GET) String show(@PathVariable Long id, Model model);  }### Answer:
@Test public void testFindAllHandler(){ final ExtendedModelMap model = new ExtendedModelMap(); String viewName = userController.list(model); List<User> users = (List<User>) model.get("users"); assertNotNull(users); assertEquals(2, users.size()); assertEquals(Long.valueOf(0), users.get(0).getId()); assertEquals("users/list", viewName); }