### Question:
BitSetDocumentVisibilityFilterCacheStrategy extends DocumentVisibilityFilterCacheStrategy { public static boolean isFullySet(int maxDoc, OpenBitSet bitSet, long cardinality) { if (cardinality >= maxDoc) { return true; } return false; } BitSetDocumentVisibilityFilterCacheStrategy(); @Override DocIdSet getDocIdSet(String fieldName, BytesRef term, AtomicReader reader); @Override Builder createBuilder(String fieldName, BytesRef term, final AtomicReader reader); static DocIdSet getFullyEmptyDocIdSet(int maxDoc); static DocIdSetIterator getFullyEmptyDocIdSetIterator(int maxDoc); static Bits getFullyEmptyBits(int maxDoc); static DocIdSet getFullySetDocIdSet(int maxDoc); static DocIdSetIterator getFullySetDocIdSetIterator(int maxDoc); static Bits getFullySetBits(int maxDoc); static boolean isFullyEmpty(OpenBitSet bitSet, long cardinality); static boolean isFullySet(int maxDoc, OpenBitSet bitSet, long cardinality); static SegmentReader getSegmentReader(IndexReader indexReader); @Override String toString(); static final DocumentVisibilityFilterCacheStrategy INSTANCE; }### Answer:
@Test public void testIdFullySet1() { int maxDoc = 10; OpenBitSet bitSet = new OpenBitSet(maxDoc); assertFalse(BitSetDocumentVisibilityFilterCacheStrategy.isFullySet(maxDoc, bitSet, bitSet.cardinality())); }
@Test public void testIdFullySet2() { int maxDoc = 10; OpenBitSet bitSet = new OpenBitSet(maxDoc); for (int d = 0; d < maxDoc; d++) { bitSet.set(d); } assertTrue(BitSetDocumentVisibilityFilterCacheStrategy.isFullySet(maxDoc, bitSet, bitSet.cardinality())); }