StateAwareParameterMap implements Map<String, String[]> { @Override public String[] remove(Object key) { return responseMap.remove(key); } StateAwareParameterMap(Map<String, String[]> requestMap,
            Map<String, String[]> responseMap); @Override void clear(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override Set<java.util.Map.Entry<String, String[]>> entrySet(); @Override String[] get(Object key); @Override boolean isEmpty(); @Override Set<String> keySet(); @Override String[] put(String key, String[] value); @Override void putAll(Map<? extends String, ? extends String[]> m); @Override String[] remove(Object key); @Override int size(); @Override Collection<String[]> values();  }
@Test public void testRemove() { String[] values = new String[] {"value1", "value2"}; expect(responseMap.remove("key")).andReturn(values); replay(requestMap, responseMap); assertArrayEquals(values, map.remove("key")); verify(requestMap, responseMap); }