diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/UtilNamespaceHandlerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/UtilNamespaceHandlerTests.java
index 42f465af58..14efce4d5c 100644
--- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/UtilNamespaceHandlerTests.java
+++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/UtilNamespaceHandlerTests.java
@@ -36,6 +36,7 @@ import org.springframework.core.io.ClassPathResource;
import org.springframework.tests.beans.CollectingReaderEventListener;
import org.springframework.tests.sample.beans.CustomEnum;
import org.springframework.tests.sample.beans.TestBean;
+import org.springframework.util.LinkedCaseInsensitiveMap;
import static org.junit.Assert.*;
@@ -162,6 +163,13 @@ public class UtilNamespaceHandlerTests {
assertEquals(this.beanFactory.getBean("testBean"), map.get("bean"));
}
+ @Test
+ public void testMapWithTypes() {
+ Map map = (Map) this.beanFactory.getBean("mapWithTypes");
+ assertTrue(map instanceof LinkedCaseInsensitiveMap);
+ assertEquals(this.beanFactory.getBean("testBean"), map.get("bean"));
+ }
+
@Test
public void testNestedCollections() {
TestBean bean = (TestBean) this.beanFactory.getBean("nestedCollectionsBean");
diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/testUtilNamespace.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/testUtilNamespace.xml
index 1294245d85..bdc8706217 100644
--- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/testUtilNamespace.xml
+++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/testUtilNamespace.xml
@@ -49,6 +49,11 @@
+
+
+
+
Rob Harrop