Code example for ModelMap

0
		assertEquals(1, this.mavContainer.getModel().size());
	} 
 
	@Test
	public void getModelRedirectModel() { 
		ModelMap redirectModel = new ModelMap("name", "redirectValue");
		this.mavContainer.setRedirectModel(redirectModel);
		this.mavContainer.addAttribute("name", "value");
 
		assertEquals("Default model should be used if not in redirect scenario", 
				"value", this.mavContainer.getModel().get("name"));
 
		this.mavContainer.setRedirectModelScenario(true);
 
		assertEquals("Redirect model should be used in redirect scenario", 
				"redirectValue", this.mavContainer.getModel().get("name"));
	} 
 
	@Test
	public void getModelIgnoreDefaultModelOnRedirect() {