### Question:
MetadataMap implements MultivaluedMap<K, V> { public void add(K key, V value) { addValue(key, value, true); } MetadataMap();  MetadataMap(int size);  MetadataMap(Map<K, List<V>> store);  MetadataMap(Map<K, List<V>> store, boolean copy);  MetadataMap(boolean readOnly, boolean caseInsensitive);  MetadataMap(Map<K, List<V>> store, boolean readOnly, boolean caseInsensitive);  MetadataMap(Map<K, List<V>> store, boolean copyStore,
                       boolean readOnly, boolean caseInsensitive); void add(K key, V value); V getFirst(K key); void putSingle(K key, V value); void clear(); boolean containsKey(Object key); boolean containsValue(Object value); Set<Entry<K, List<V>>> entrySet(); List<V> get(Object key); boolean isEmpty(); Set<K> keySet(); List<V> put(K key, List<V> value); void putAll(Map<? extends K, ? extends List<V>> map); List<V> remove(Object key); int size(); Collection<List<V>> values(); @Override int hashCode(); @Override boolean equals(Object o); String toString(); @SafeVarargs final void addAll(K key, V... newValues); void addAll(K key, List<V> newValues); void addFirst(K key, V value); boolean equalsIgnoreValueOrder(MultivaluedMap<K, V> map);  }### Answer:
@Test(expected = UnsupportedOperationException.class) public void testReadOnlyAdd() { MetadataMap<String, Object> m = new MetadataMap<>(); m.add("baz", "bar"); MetadataMap<String, Object> m2 = new MetadataMap<>(m, true, false); m2.add("bar", "foo"); }