PartialIndex implements AttributeIndex<A, O> { @Override public void clear(QueryOptions queryOptions) { backingIndex().clear(queryOptions); } protected  PartialIndex(Attribute<O, A> attribute, Query<O> filterQuery); Attribute<O, A> getAttribute(); Query<O> getFilterQuery(); AttributeIndex<A, O> getBackingIndex(); @Override boolean supportsQuery(Query<O> query, QueryOptions queryOptions); @Override boolean equals(Object o); @Override int hashCode(); @Override boolean isMutable(); @Override boolean isQuantized(); @Override ResultSet<O> retrieve(Query<O> query, QueryOptions queryOptions); @Override Index<O> getEffectiveIndex(); @Override void init(ObjectStore<O> objectStore, QueryOptions queryOptions); @Override void destroy(QueryOptions queryOptions); @Override boolean addAll(ObjectSet<O> objectSet, QueryOptions queryOptions); @Override boolean removeAll(ObjectSet<O> objectSet, QueryOptions queryOptions); @Override void clear(QueryOptions queryOptions);  }
@Test public void testClear() { AttributeIndex<Integer, Car> backingIndex = mockBackingIndex(); PartialIndex<Integer, Car, AttributeIndex<Integer, Car>> index = wrapWithPartialIndex(backingIndex); index.clear(noQueryOptions()); verify(backingIndex, times(1)).clear(noQueryOptions()); }