public void testCopyBitsToLargerSet() {
    CircularBitSet left = new CircularBitSet(5, null);
    setBits(left, true, 2);
    setBits(left, false, 3);

    left.nextIndex = 0;
    CircularBitSet right = new CircularBitSet(6, left);
    assertValues(right, true, true, false, false, false);

    left.nextIndex = 2;
    right = new CircularBitSet(6, left);
    assertValues(right, false, false, false, true, true);

    left.nextIndex = 4;
    right = new CircularBitSet(6, left);
    assertValues(right, false, true, true, false, false);
  }
  public void testCopyBitsToSmallerSet() {
    CircularBitSet left = new CircularBitSet(10, null);
    setBits(left, true, 5);
    setBits(left, false, 5);

    left.nextIndex = 0;
    CircularBitSet right = new CircularBitSet(4, left);
    assertValues(right, false, false, false, false);

    left.nextIndex = 2;
    right = new CircularBitSet(4, left);
    assertValues(right, false, false, true, true);

    left.nextIndex = 7;
    right = new CircularBitSet(4, left);
    assertValues(right, true, true, false, false);
  }