### Question:
FastAggregation { public static RoaringBitmap naive_or(Iterator<? extends RoaringBitmap> bitmaps) { RoaringBitmap answer = new RoaringBitmap(); while (bitmaps.hasNext()) { answer.naivelazyor(bitmaps.next()); } answer.repairAfterLazy(); return answer; } private  FastAggregation(); static RoaringBitmap and(Iterator<? extends RoaringBitmap> bitmaps); static RoaringBitmap and(RoaringBitmap... bitmaps); static RoaringBitmap and(long[] aggregationBuffer, RoaringBitmap... bitmaps); @Deprecated static RoaringBitmap horizontal_or(Iterator<? extends RoaringBitmap> bitmaps); static RoaringBitmap horizontal_or(List<? extends RoaringBitmap> bitmaps); static RoaringBitmap horizontal_or(RoaringBitmap... bitmaps); static RoaringBitmap horizontal_xor(RoaringBitmap... bitmaps); static RoaringBitmap naive_and(Iterator<? extends RoaringBitmap> bitmaps); static RoaringBitmap naive_and(RoaringBitmap... bitmaps); static RoaringBitmap workShyAnd(long[] buffer, RoaringBitmap... bitmaps); static RoaringBitmap workAndMemoryShyAnd(long[] buffer, RoaringBitmap... bitmaps); static RoaringBitmap naive_or(Iterator<? extends RoaringBitmap> bitmaps); static RoaringBitmap naive_or(RoaringBitmap... bitmaps); static RoaringBitmap naive_xor(Iterator<? extends RoaringBitmap> bitmaps); static RoaringBitmap naive_xor(RoaringBitmap... bitmaps); static RoaringBitmap or(Iterator<? extends RoaringBitmap> bitmaps); static RoaringBitmap or(RoaringBitmap... bitmaps); static RoaringBitmap priorityqueue_or(Iterator<? extends RoaringBitmap> bitmaps); static RoaringBitmap priorityqueue_or(RoaringBitmap... bitmaps); static RoaringBitmap priorityqueue_xor(RoaringBitmap... bitmaps); static RoaringBitmap xor(Iterator<? extends RoaringBitmap> bitmaps); static RoaringBitmap xor(RoaringBitmap... bitmaps);  }### Answer:
@Test public void testNaiveOrWithIterator() { final RoaringBitmap b1 = RoaringBitmap.bitmapOf(1, 2); final RoaringBitmap b2 = RoaringBitmap.bitmapOf(2, 3); final RoaringBitmap bResult = FastAggregation.naive_or(Arrays.asList(b1, b2).iterator()); assertTrue(bResult.contains(1)); assertTrue(bResult.contains(2)); assertTrue(bResult.contains(3)); final ExtendedRoaringBitmap eb1 = new ExtendedRoaringBitmap(); eb1.add(1); eb1.add(2); final ExtendedRoaringBitmap eb2 = new ExtendedRoaringBitmap(); eb2.add(2); eb2.add(3); final RoaringBitmap ebResult = FastAggregation.naive_or(Arrays.asList(b1, b2).iterator()); assertTrue(ebResult.contains(1)); assertTrue(ebResult.contains(2)); assertTrue(ebResult.contains(3)); }