final int maxDoc = TestUtil.nextInt(random(), 1, 1 << pow);
final int numDocs = TestUtil.nextInt(random(), 0, Math.min(maxDoc, 1 << TestUtil.nextInt(random(), 0, pow)));
final BitSet set = randomSet(maxDoc, numDocs);
final DocIdSet copy = copyOf(set, maxDoc);
final long actualBytes = ramBytesUsed(copy, maxDoc);
final long expectedBytes = copy.ramBytesUsed();
assertEquals(expectedBytes, actualBytes);
}
}
/** Assert that the content of the {@link DocIdSet} is the same as the content of the {@link BitSet}. */