CaseInsensitiveMapWrapper { public T get(String key) { return delegate.get(key.toLowerCase()); } CaseInsensitiveMapWrapper(Map<String, T> delegate); T get(String key); T put(String key, T value); T remove(String key);  }
@Test public void testGet() throws Exception { String someKey = "someKey"; Object someValue = mock(Object.class); when(someMap.get(someKey.toLowerCase())).thenReturn(someValue); assertEquals(someValue, caseInsensitiveMapWrapper.get(someKey)); verify(someMap, times(1)).get(someKey.toLowerCase()); }