CaseinsensitiveMap extends HashMap<String, V> { @Override public V get(Object key) { return super.get(((String)key).toLowerCase()); }  @Override V put(String key, V value); @Override V get(Object key);  }
@Test public void testGet() throws Exception { Map<String, String> theMap = new CaseinsensitiveMap<String>(); theMap.put("UPPER", "UPPER"); theMap.put("lower", "lower"); assertEquals("UPPER", theMap.get("upper")); assertEquals("UPPER", theMap.get("UPPER")); assertEquals("lower", theMap.get("lower")); assertEquals("lower", theMap.get("LOWER")); }