RangeSet extends AbstractSet<Long> implements Set<Long> { @Override public boolean removeAll(Collection<?> c) { boolean changed = false; for (Object o : c) { changed |= remove(o); } return changed; }  @Override int size(); @Override boolean contains(Object o); @Override Iterator<Long> iterator(); @Override boolean add(Long aLong); @Override boolean remove(Object o); @Override boolean removeAll(Collection<?> c); @Override void clear();  }
@Test(groups = "fast") public void testRemoveAll() throws Exception { Assert.assertTrue(set.isEmpty()); Assert.assertEquals(set.size(), 0); Assert.assertTrue(set.addAll(Arrays.asList(0L, 2L, 3L, 5L, 6L, 8L, 9L, 10L))); Assert.assertEquals(set.size(), 8); Assert.assertFalse(set.removeAll(Arrays.asList(11L, 12L, 13L, 15L, 16L))); Assert.assertEquals(set.size(), 8); Assert.assertTrue(set.removeAll(Arrays.asList(0L, 1L, 2L, 3L, 4L, 5L, 6L))); Assert.assertEquals(set.size(), 3); }