ServletContextSymbolProvider implements SymbolProvider { public String valueForSymbol(String symbolName) { return properties.get(symbolName); } ServletContextSymbolProvider(ServletContext context); String valueForSymbol(String symbolName);  }
@Test public void access_of_keys_is_case_insensitive() { ServletContext context = newMock(ServletContext.class); String key1 = "fred"; String value1 = "Fred Flintstone"; String key2 = "barney"; String value2 = "Barney Rubble"; expect(context.getInitParameterNames()).andReturn(toEnumeration(key1, key2)); expect(context.getInitParameter(key1)).andReturn(value1); expect(context.getInitParameter(key2)).andReturn(value2); replay(); SymbolProvider p = new ServletContextSymbolProvider(context); assertEquals(p.valueForSymbol(key1), value1); assertEquals(p.valueForSymbol(key2), value2); assertNull(p.valueForSymbol("wilma")); assertEquals(p.valueForSymbol("FRED"), value1); verify(); }