@Test
public void testPartialSQLiteIndex() {

    IndexedCollection<Car> indexedCollection = new ConcurrentIndexedCollection<Car>();
    ConnectionManager connectionManager = temporaryInMemoryDatabase.getConnectionManager(true);
    QueryOptions queryOptions = new QueryOptions();
    queryOptions.put(ConnectionManager.class, connectionManager);
    PartialSQLiteIndex<String, Car, Integer> index = PartialSQLiteIndex.onAttributeWithFilterQuery(Car.MANUFACTURER, OBJECT_TO_ID, ID_TO_OBJECT, between(Car.CAR_ID, 2, 4));
    indexedCollection.addIndex(index, queryOptions);
    indexedCollection.update(Collections.<Car>emptySet(), CarFactory.createCollectionOfCars(10), queryOptions);
    assertEquals(75,         indexedCollection.retrieve(and(equal(Car.MANUFACTURER, "Ford"), between(Car.CAR_ID, 2, 4)), queryOptions).getRetrievalCost());
    assertEquals(2147483647, indexedCollection.retrieve(and(equal(Car.MANUFACTURER, "Ford"), between(Car.CAR_ID, 2, 5)), queryOptions).getRetrievalCost());
}