### Question:
TreeValueSortedMap extends AbstractMap<K, V> implements ValueSortedMap<K, V> { @Override public V remove(Object key) { Node n = nodeMap.remove(key); if (n == null) { return null; } n.remove(); return n.val; } @SuppressWarnings({ "rawtypes", "unchecked" }) protected  TreeValueSortedMap(); protected  TreeValueSortedMap(Comparator<V> comparator); static TreeValueSortedMap<K, V> createWithNaturalOrder(); static TreeValueSortedMap<K, V> createWithComparator(Comparator<V> comparator); @Override void clear(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override ValueSortedTreeMapEntrySet entrySet(); @Override V get(Object key); @Override Entry<K, V> lowerEntryByValue(V value); @Override Entry<K, V> floorEntryByValue(V value); @Override Entry<K, V> ceilingEntryByValue(V value); @Override Entry<K, V> higherEntryByValue(V value); @Override boolean isEmpty(); @Override ValueSortedTreeMapKeySet keySet(); @Override V put(K key, V value); @Override void putAll(Map<? extends K, ? extends V> m); @Override V remove(Object key); @Override int size(); @Override boolean update(K key); @Override ValueSortedTreeMapValues values(); @Override ValueSortedMap<K, V> subMapByValue(V fromValue, boolean fromInclusive, V toValue,
			boolean toInclusive); @Override // TODO: Test this implementation and related others ValueSortedMap<K, V> headMapByValue(V toValue, boolean inclusive); @Override ValueSortedMap<K, V> tailMapByValue(V fromValue, boolean inclusive);  }### Answer:
@Test(expected = IllegalStateException.class) public void testNominalBehaviorIteratorRemoveBeforeNext() { Set<Integer> set = new HashSet<>(); set.add(5); Iterator<Integer> it = set.iterator(); it.remove(); }