PartialSortedKeyStatisticsAttributeIndex extends PartialIndex<A, O, SortedKeyStatisticsAttributeIndex<A, O>> implements SortedKeyStatisticsAttributeIndex<A, O> { @Override public CloseableIterable<A> getDistinctKeysDescending(QueryOptions queryOptions) { return backingIndex().getDistinctKeysDescending(queryOptions); } protected  PartialSortedKeyStatisticsAttributeIndex(Attribute<O, A> attribute, Query<O> filterQuery); @Override CloseableIterable<A> getDistinctKeys(QueryOptions queryOptions); @Override CloseableIterable<A> getDistinctKeys(A lowerBound, boolean lowerInclusive, A upperBound, boolean upperInclusive, QueryOptions queryOptions); @Override CloseableIterable<A> getDistinctKeysDescending(QueryOptions queryOptions); @Override CloseableIterable<A> getDistinctKeysDescending(A lowerBound, boolean lowerInclusive, A upperBound, boolean upperInclusive, QueryOptions queryOptions); @Override CloseableIterable<KeyStatistics<A>> getStatisticsForDistinctKeysDescending(QueryOptions queryOptions); @Override CloseableIterable<KeyValue<A, O>> getKeysAndValues(QueryOptions queryOptions); @Override CloseableIterable<KeyValue<A, O>> getKeysAndValues(A lowerBound, boolean lowerInclusive, A upperBound, boolean upperInclusive, QueryOptions queryOptions); @Override CloseableIterable<KeyValue<A, O>> getKeysAndValuesDescending(QueryOptions queryOptions); @Override CloseableIterable<KeyValue<A, O>> getKeysAndValuesDescending(A lowerBound, boolean lowerInclusive, A upperBound, boolean upperInclusive, QueryOptions queryOptions); @Override Integer getCountForKey(A key, QueryOptions queryOptions); @Override Integer getCountOfDistinctKeys(QueryOptions queryOptions); @Override CloseableIterable<KeyStatistics<A>> getStatisticsForDistinctKeys(QueryOptions queryOptions);  }
@Test public void testGetDistinctKeysDescending1() { SortedKeyStatisticsAttributeIndex<Integer, Car> backingIndex = mockBackingIndex(); PartialSortedKeyStatisticsAttributeIndex<Integer, Car> index = wrapWithPartialIndex(backingIndex); index.getDistinctKeysDescending(noQueryOptions()); verify(backingIndex, times(1)).getDistinctKeysDescending(noQueryOptions()); }
@Test public void testGetDistinctKeysDescending2() { SortedKeyStatisticsAttributeIndex<Integer, Car> backingIndex = mockBackingIndex(); PartialSortedKeyStatisticsAttributeIndex<Integer, Car> index = wrapWithPartialIndex(backingIndex); index.getDistinctKeysDescending(1, true, 2, true, noQueryOptions()); verify(backingIndex, times(1)).getDistinctKeysDescending(1, true, 2, true, noQueryOptions()); }