### Question:
MultiMapUtils { public static <K, V> Set<V> getValuesAsSet(final MultiValuedMap<K, V> map, final K key) { if (map != null) { Collection<V> col = map.get(key); if (col instanceof Set) { return (Set<V>) col; } return new HashSet<V>(col); } return null; } private  MultiMapUtils(); @SuppressWarnings("unchecked") static MultiValuedMap<K, V> emptyMultiValuedMap(); @SuppressWarnings("unchecked") static MultiValuedMap<K, V> emptyIfNull(final MultiValuedMap<K, V> map); static boolean isEmpty(final MultiValuedMap<?, ?> map); static Collection<V> getCollection(final MultiValuedMap<K, V> map, final K key); static List<V> getValuesAsList(final MultiValuedMap<K, V> map, final K key); static Set<V> getValuesAsSet(final MultiValuedMap<K, V> map, final K key); static Bag<V> getValuesAsBag(final MultiValuedMap<K, V> map, final K key); static ListValuedMap<K, V> newListValuedHashMap(); static SetValuedMap<K, V> newSetValuedHashMap(); static MultiValuedMap<K, V> unmodifiableMultiValuedMap(
            final MultiValuedMap<? extends K, ? extends V> map); static MultiValuedMap<K, V> transformedMultiValuedMap(final MultiValuedMap<K, V> map,
            final Transformer<? super K, ? extends K> keyTransformer,
            final Transformer<? super V, ? extends V> valueTransformer); @SuppressWarnings({ "rawtypes", "unchecked" })
    static final MultiValuedMap EMPTY_MULTI_VALUED_MAP; }### Answer:
@Test public void testGetValuesAsSet() { assertNull(MultiMapUtils.getValuesAsList(null, "key1")); String values[] = { "v1", "v2", "v3" }; final MultiValuedMap<String, String> map = new ArrayListValuedHashMap<String, String>(); for (String val : values) { map.put("key1", val); map.put("key1", val); } Set<String> set = MultiMapUtils.getValuesAsSet(map, "key1"); assertEquals(3, set.size()); for (String val : values) { assertTrue(set.contains(val)); } }