CacheTagSet implements Set<CacheTag>, Serializable { public Iterator<CacheTag> iterator() { return tags.iterator(); } CacheTagSet();  CacheTagSet(CacheTag[] tags); CacheTag[] getTags(); boolean add(String key, String value); boolean add(CacheTag tag); boolean excludeTagsWith(String key); boolean excludeTagsWith(Collection<String> keys); boolean addAll(Collection<? extends CacheTag> c); void clear(); boolean contains(Object o); boolean containsAll(Collection<?> c); boolean isEmpty(); Iterator<CacheTag> iterator(); boolean remove(Object o); boolean remove(String name, Object value); boolean removeAll(Collection<?> c); boolean removeAllByTagName(String name); boolean retainAll(Collection<?> c); int size(); Object[] toArray(); T[] toArray(T[] a); String toString();  }
@Test public void testIterator() { assertNotNull(set.iterator()); assertTrue(set.iterator().hasNext()); Iterator<CacheTag> iter = set.iterator(); for (int i = 0; i < 3; i++) iter.next(); assertFalse(iter.hasNext()); }