### Question:
IdBitMap extends RangeBitmap { @Override public ImmutableBitMap getAnd(ImmutableBitMap index) { if (index.contains(start)) { return this; } return new EmptyBitmap(); } private  IdBitMap(int id); int getId(); static ImmutableBitMap of(int id); @Override ImmutableBitMap getAnd(ImmutableBitMap index); @Override ImmutableBitMap getOr(ImmutableBitMap index); @Override ImmutableBitMap clone(); @Override BitMapType getType(); @Override byte[] toBytes(); @Override String toString();  }### Answer:
@Test public void testGetAnd() { MutableBitMap m = getMutableBitMap(); int[] a = prepare(m); int id = r.nextInt(BOUND); ImmutableBitMap im = IdBitMap.of(id); ImmutableBitMap and = im.getAnd(m); for (int i = 0; i < a.length; i++) { if (i != id && and.contains(i)) { fail(); } } int tmp = id < a.length ? a[id] : 0; if ((tmp == 1) != and.contains(id)) { fail(); } }