package org.roaringbitmap;

import org.junit.Test;
import org.roaringbitmap.buffer.ImmutableRoaringBitmap;

import static org.junit.Assert.assertEquals;

public class TestImmutableRoaringBitmap {

    @Test
    public void xor() {
        ImmutableRoaringBitmap a = ImmutableRoaringBitmap.bitmapOf(1, 73647, 83469);
        ImmutableRoaringBitmap b = ImmutableRoaringBitmap.bitmapOf(1, 5, 10<<16);
        ImmutableRoaringBitmap xor = ImmutableRoaringBitmap.xor(a, b);
        ImmutableRoaringBitmap expected = ImmutableRoaringBitmap.bitmapOf(5, 73647, 83469, 10<<16);
        assertEquals(expected, xor);
    }

    @Test
    public void or() {
        ImmutableRoaringBitmap a = ImmutableRoaringBitmap.bitmapOf(1, 73647, 83469);
        ImmutableRoaringBitmap b = ImmutableRoaringBitmap.bitmapOf(1, 5, 10<<16);
        ImmutableRoaringBitmap expected = ImmutableRoaringBitmap.bitmapOf(1, 5, 73647, 83469, 10<<16);
        assertEquals(expected, ImmutableRoaringBitmap.or(a, b));
        assertEquals(expected, ImmutableRoaringBitmap.or(b, a));
    }

}

@@ -1046,10 +1046,1108 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void andNot() %7B%0A        ImmutableRoaringBitmap a = ImmutableRoaringBitmap.bitmapOf(1%3C%3C16, 2%3C%3C16);%0A        ImmutableRoaringBitmap b = ImmutableRoaringBitmap.bitmapOf(11, 12, 13, 2%3C%3C16);%0A        ImmutableRoaringBitmap andNot = ImmutableRoaringBitmap.andNot(a, b);%0A        ImmutableRoaringBitmap expected = ImmutableRoaringBitmap.bitmapOf(1%3C%3C16);%0A        assertEquals(expected, andNot);%0A    %7D%0A%0A    @Test(expected = RuntimeException.class)%0A    public void flipInvalidRange() %7B%0A        ImmutableRoaringBitmap a = ImmutableRoaringBitmap.bitmapOf(1, 5, 7, 13);%0A        ImmutableRoaringBitmap.flip(a, 7L, 5L);%0A    %7D%0A%0A    @Test(expected = IllegalArgumentException.class)%0A    public void flipInvalidRange2() %7B%0A        ImmutableRoaringBitmap a = ImmutableRoaringBitmap.bitmapOf(1, 5, 7, 13);%0A        ImmutableRoaringBitmap.flip(a, 1L%3C%3C32, 1L%3C%3C33);%0A    %7D%0A%0A    @Test(expected = IllegalArgumentException.class)%0A    public void flipInvalidRange3() %7B%0A        ImmutableRoaringBitmap a = ImmutableRoaringBitmap.bitmapOf(1, 5, 7, 13);%0A        ImmutableRoaringBitmap.flip(a, 1L, 1L%3C%3C33);%0A    %7D%0A%0A%0A%0A
 %7D%0A

Improve code coverage