/** * Test method: void clear() * * @throws Exception */ public void testClear() throws Exception { BitMap instance = new BitMap(1000L); for (int i = 0; i < 1000; i++) { if ((int) (Math.random() * 2) == 1) { instance.setBit(i); } } instance.clear(); for (int i = 0; i < 1000; i++) { assertEquals(instance.getBit(i), 0L); } }