### Question:
Bitlist { public int getBitCount() { return data.cardinality(); } Bitlist(int arraySize, long maxSize);  Bitlist(Bitlist bitlist); private  Bitlist(int size, BitSet data, long maxSize); void setBit(int i); void setBits(int... indexes); boolean getBit(int i); int getBitCount(); boolean intersects(Bitlist other); boolean isSuperSetOf(final Bitlist other); List<Integer> getAllSetBits(); IntStream streamAllSetBits(); void setAllBits(Bitlist other); long getMaxSize(); int getCurrentSize(); @SuppressWarnings("NarrowingCompoundAssignment") Bytes serialize(); static int sszSerializationLength(final int size); static Bitlist fromBytes(Bytes bytes, long maxSize); Bitlist copy(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void countSetBits() { assertThat(create(1, 2, 6, 7, 9).getBitCount()).isEqualTo(5); }