ReadOnlyEnumerationMap implements Map<String, V> { public V get(Object key) { return (request.getValue(key(key))); } ReadOnlyEnumerationMap(HasKeys<V> request); void clear(); boolean containsKey(Object key); @SuppressWarnings("unchecked") boolean containsValue(Object value); Set<Map.Entry<String, V>> entrySet(); V get(Object key); boolean isEmpty(); Set<String> keySet(); V put(String key, V value); void putAll(Map<? extends String, ? extends V> map); V remove(Object key); int size(); Collection<V> values(); @SuppressWarnings("unchecked") @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testGet() { expect(extractor.getValue("two")).andReturn(2); replay(extractor); assertEquals(new Integer(2), map.get("two")); verify(extractor); }