### Question:
SingletonIntSet extends AbstractImmutableIntSet { @Override public boolean containsAll(IntSet set) { int size = set.size(); return size == 0 || size == 1 && set.contains(value); } SingletonIntSet(int value); @Override boolean contains(int i); @Override boolean containsAll(IntSet set); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override PrimitiveIterator.OfInt iterator(); @Override Object[] toArray(); @Override T[] toArray(T[] a); @Override int[] toIntArray(); @Override boolean containsAll(Collection<?> c); @Override IntStream intStream(); @Override void forEach(IntConsumer action); @Override void forEach(Consumer<? super Integer> action); @Override Spliterator.OfInt intSpliterator(); @Override Spliterator<Integer> spliterator(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }### Answer:
@Test public void testContainsAll() throws Exception { IntSet sis = new SingletonIntSet(3); IntSet sis2 = new SingletonIntSet(3); assertTrue(sis.containsAll(sis2)); assertTrue(sis2.containsAll(sis)); IntSet sis3 = new RangeSet(4); assertTrue(sis3.containsAll(sis)); assertFalse(sis.containsAll(sis3)); }
@Test public void testContainsAll1() throws Exception { IntSet sis = new SingletonIntSet(3); Set<Integer> hashSet = new HashSet<>(Arrays.asList(3)); assertTrue(sis.containsAll(hashSet)); assertTrue(hashSet.containsAll(sis)); hashSet.add(0); assertTrue(hashSet.containsAll(sis)); assertFalse(sis.containsAll(hashSet)); }