FilteredObjectStore implements ObjectStore<O> { @Override public void clear(QueryOptions queryOptions) { throw new UnsupportedOperationException(); } FilteredObjectStore(ObjectStore<O> backingObjectStore, Query<O> filterQuery); @Override CloseableIterator<O> iterator(QueryOptions queryOptions); @Override int size(QueryOptions queryOptions); @Override boolean contains(Object o, QueryOptions queryOptions); @Override boolean isEmpty(QueryOptions queryOptions); @Override boolean add(O object, QueryOptions queryOptions); @Override boolean remove(Object o, QueryOptions queryOptions); @Override boolean containsAll(Collection<?> c, QueryOptions queryOptions); @Override boolean addAll(Collection<? extends O> c, QueryOptions queryOptions); @Override boolean retainAll(Collection<?> c, QueryOptions queryOptions); @Override boolean removeAll(Collection<?> c, QueryOptions queryOptions); @Override void clear(QueryOptions queryOptions);  }
@Test(expected = UnsupportedOperationException.class) public void testClear() { filteredObjectStore.clear(noQueryOptions()); }