HeaderValuesMap implements Map<String, String[]> { public boolean containsKey(Object key) { return (request.getValue(key(key)) != null); } HeaderValuesMap(EnumeratedValuesExtractor request); void clear(); boolean containsKey(Object key); boolean containsValue(Object value); Set<Map.Entry<String, String[]>> entrySet(); @Override boolean equals(Object o); String[] get(Object key); @Override int hashCode(); boolean isEmpty(); Set<String> keySet(); String[] put(String key, String[] value); void putAll(Map<? extends String, ? extends String[]> map); String[] remove(Object key); int size(); Collection<String[]> values();  }
@Test public void testContainsKey() { expect(extractor.getValue("one")).andReturn("value1"); expect(extractor.getValue("two")).andReturn(null); replay(extractor); assertTrue(map.containsKey("one")); assertFalse(map.containsKey("two")); verify(extractor); }