Code example for ModelAndView

Methods: getModel

0
		LocationFormController controller = (LocationFormController) applicationContext.getBean("locationForm");
		 
		ModelAndView modelAndView = controller.handleRequest(request, response);
		 
		// make sure there is an "locationId" filled in on the concept 
		Location command = (Location) modelAndView.getModel().get("location");
		Assert.assertNotNull(command.getLocationId());
	} 
}