### Question:
HashSet extends Set<E> { @Override public boolean add(E object) { return backingMap.put(object, this) == null; } HashSet();  HashSet(int capacity);  HashSet(int capacity, float loadFactor);  HashSet(Collection<E> collection);  HashSet(E... args);   HashSet(HashMap<E, HashSet<E>> backingMap); @Override boolean add(E object); @Override void clear(); @Override boolean contains(E object); @Override boolean isEmpty(); @Override Iterator<E> iterator(); @Override boolean remove(E object); @Override int size();  }### Answer:
@Test public void testAdd() { int size = hs.size(); hs.add(8); assertTrue("Added element already contained by set", hs.size() == size); hs.add(-9); assertTrue("Failed to increment set size after add", hs.size() == size + 1); assertTrue("Failed to add element to set", hs.contains(-9)); }
@Test public void testContainsAll() { HashSet<String> sut = new HashSet<String>(); sut.add("2"); sut.add("1"); ArrayList<String> testData = new ArrayList<String>(); testData.add("1"); testData.add("2"); assertTrue(sut.containsAll(testData)); }