BidirectionalMultiMap { public void put(K key, V value) { _primaryMap.put(ArgumentChecker.notNull(key, "key"), ArgumentChecker.notNull(value, "value")); _secondaryMap.put(value, key); } BidirectionalMultiMap(); private  BidirectionalMultiMap(SetMultimap<K, V> primaryMap, SetMultimap<V, K> secondaryMap); private  BidirectionalMultiMap(SetMultimap<K, V> primaryMap, SetMultimap<V, K> secondaryMap,
                                BidirectionalMultiMap<V, K> inverse); BidirectionalMultiMap<V, K> inverse(); void put(K key, V value); Set<V> get(K key); boolean containsKey(K key); Set<K> keySet(); void remove(K key, V value); int size(); Set<V> removeAll(K key);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullKeysProhibited() { _bidirectionalMultiMap.put(null, 42); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullValuesProhibited() { _bidirectionalMultiMap.put("forty two", null); }