BitSet b2 = new BitSet();
IntStream.range(0, 100).forEach(i -> b1.set(i*10, true));
IntStream.range(0, 100).forEach(i -> b2.set(i*99, true));
RedisPool pool = Helper.getPool();
RedisBitSet rb1 = new RedisBitSet(pool, "b1", b1.size());
rb1.overwriteBitSet(b1);
RedisBitSet rb2 = new RedisBitSet(pool, "b2", b2.size());
rb2.overwriteBitSet(b2);
assertEquals(b1, rb1.asBitSet());
assertEquals(b2, rb2.asBitSet());
assertThat(rb1, not(equalTo(rb2)));
assertThat(b1, not(equalTo(b2)));
assertThat(rb1, not(equalTo(b2)));
}