@Test
public void testGetRandomBits() {

  final int limit = 100;
  Random rand1 = new Random(0);
  BitSet b = BitSetUtils.getRandomBits(limit, rand1);
  Random rand2 = new Random(0);
  for (int i = 0; i < limit; i++) {
    Assert.assertEquals(rand2.nextBoolean(), b.get(i));
  }
}