class BloomFilter implements Serializable {

    public synchronized boolean getBit(int bit) {
        return bitset.get(bit);
    }

}

class BloomFilterTest {

    static Random r;

    @Test
    public void testGetBit() {

        System.out.println("getBit");
        BloomFilter instance = new BloomFilter(1000, 100);
        Random r = new Random();

        for (int i = 0; i < 100; i++) {
            boolean b = r.nextBoolean();
            instance.setBit(i, b);
            assertSame(instance.getBit(i), b);
        }
    }

}