### Question:
ArrayList extends List<E> { @Override public void add(int location, E object) { if (location < 0 || location > itemCount) { throw new ProgrammerError("Index out of bounds; index: {}, size: {}", location, itemCount); } if (location == 0) { if (firstIndex == 0) { growAtFront(1); } array[--firstIndex] = object; } else if (location == itemCount) { if (firstIndex + itemCount == array.length) { growAtEnd(1); } array[firstIndex + itemCount] = object; } else { if (itemCount == array.length) { growForInsert(location, 1); } else if (firstIndex + itemCount == array.length || (firstIndex > 0 && location < itemCount / 2)) { SystemUtils.arraycopy(array, firstIndex, array, --firstIndex, location); } else { int index = location + firstIndex; SystemUtils.arraycopy(array, index, array, index + 1, itemCount - location); } array[location + firstIndex] = object; } itemCount++; modCount++; } ArrayList();  ArrayList(int capacity);  ArrayList(Collection<E> collection);  ArrayList(E... args); @Override void add(int location, E object); @Override boolean add(E object); @Override boolean addAll(int location, Collection<? extends E> collection); @Override boolean addAll(Collection<? extends E> collection); @Override void clear(); @Override boolean contains(E object); void ensureCapacity(int minimumCapacity); @Override E get(int location); @Override int indexOf(E object); @Override boolean isEmpty(); @Override int lastIndexOf(E object); @Override Iterator<E> iterator(); @Override E remove(int location); @Override boolean remove(E object); @Override E set(int location, E object); @Override int size(); @Override Object[] toArray(); @Override void toArray(E[] contents); void sortInPlace(Comparator<E> comparator); void trimToSize();  }### Answer:
@Test public void testAdd() { Object o = new Object(); alist.add(o); assertTrue("Failed to add Object", alist.get(alist.size() - 1) == o); alist.add(null); assertNull("Failed to add null", alist.get(alist.size() - 1)); }
@Test public void testContainsAll() { List<String> sut = new ArrayList<String>(1); sut.add("1"); sut.add("2"); sut.add("3"); sut.add("4"); List<String> data = new ArrayList<String>(); data.add("2"); data.add("4"); assertTrue(sut.containsAll(data)); }