KeySet implements Set<String> { @Override public void clear() { throw new UnsupportedOperationException(); } KeySet(HasKeys<?> request); @Override boolean add(String e); @Override boolean addAll(Collection<? extends String> c); @Override void clear(); @Override boolean contains(Object o); @SuppressWarnings("unchecked") @Override boolean containsAll(Collection<?> c); @Override boolean isEmpty(); @Override Iterator<String> iterator(); @Override boolean remove(Object o); @Override boolean removeAll(Collection<?> c); @Override boolean retainAll(Collection<?> c); @Override int size(); @Override Object[] toArray(); @Override T[] toArray(T[] a);  }
@Test(expected = UnsupportedOperationException.class) public void testClear() { entrySet.clear(); }