@Test
@SuppressWarnings({"MismatchedQueryAndUpdateOfCollection", "StatementWithEmptyBody"})

public void testOrQueryCollectionScan() {
    IterationCountingSet<Car> iterationCountingSet = new IterationCountingSet<Car>(CarFactory.createCollectionOfCars(10));
    IndexedCollection<Car> collection = new ConcurrentIndexedCollection<Car>(WrappingPersistence.aroundCollection(iterationCountingSet));
    Query<Car> query = or(equal(Car.COLOR, Car.Color.BLUE), equal(Car.MANUFACTURER, "Honda"));
    ResultSet<Car> resultSet = collection.retrieve(query);
    for (Car car : resultSet) {
        // No op
    }
    // The two-branch or() query should have been evaluated by scanning the collection only once...
    Assert.assertEquals(iterationCountingSet.size(), iterationCountingSet.getItemsIteratedCount());
}