<BUG>collection.addIndex(withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10), Car.CAR_ID));collection.addAll(CarFactory.createCollectionOfCars(100));</BUG><CONTEXT>assertEquals(carIdsFound, asList(47, 48, 49, 50, 51, 52, 53));}@Testpublic void indexQuantization_FirstBucket() {IndexedCollection<EntityHandle<Car>> collection = new ConcurrentIndexedCollection<>();<extra_id_0>assertEquals(collection.retrieve(between(Car.CAR_ID, 2, 4)).getMergeCost(), 10);assertEquals(collection.retrieve(between(Car.CAR_ID, 2, 4)).size(), 3);List<Integer> carIdsFound = retrieveCarIds(collection, between(Car.CAR_ID, 2, 4));</CONTEXT>
Index<EntityHandle<Car>> index = withQuantizerOnAttribute(IntegerQuantizer.withCompressionFactor(10),Car.CAR_ID);index.clear(noQueryOptions());collection.addIndex(index);collection.addAll(CarFactory.createCollectionOfCars(100));