@Test public void textHome() { String result = ctxController.home(model); assertEquals("home", result); String modelData = (String)model.get("bogus"); assertEquals("data", modelData); }
@RequestMapping("/home") public String home(ModelMap model) { model.put("bogus", "data"); return "home"; }
CtxController { @RequestMapping("/home") public String home(ModelMap model) { model.put("bogus", "data"); return "home"; } }
CtxController { @RequestMapping("/home") public String home(ModelMap model) { model.put("bogus", "data"); return "home"; } @Autowired  CtxController(ApplicationContext ctx); }
CtxController { @RequestMapping("/home") public String home(ModelMap model) { model.put("bogus", "data"); return "home"; } @Autowired  CtxController(ApplicationContext ctx); @RequestMapping("/") @ResponseBody String index(); @RequestMapping("/home") String home(ModelMap model); }
CtxController { @RequestMapping("/home") public String home(ModelMap model) { model.put("bogus", "data"); return "home"; } @Autowired  CtxController(ApplicationContext ctx); @RequestMapping("/") @ResponseBody String index(); @RequestMapping("/home") String home(ModelMap model);  }