### Question:
ArrayIndexedCollection extends Collection { @Override public void forEach(Processor processor) { for (int index = 0; index < size; ++index) { processor.process(elements[index]); } } ArrayIndexedCollection();  ArrayIndexedCollection(int initialCapacity);  ArrayIndexedCollection(Collection collection);  ArrayIndexedCollection(Collection collection, int capacity); @Override int size(); @Override boolean contains(Object value); @Override boolean remove(Object value); @Override Object[] toArray(); @Override void forEach(Processor processor); @Override void add(Object value); Object get(int index); @Override void clear(); void insert(Object value, int position); int indexOf(Object value); void remove(int index); @Override String toString(); static final int VALUE_NOT_FOUND_RETURN_VALUE; }### Answer:
@Test void testForEachWithEmptyCollection() { createCollectionWithNElements(0).forEach(new Processor() { @Override public void process(Object value) { assertNotNull(value); } }); }
@Test void testForEachWithNonEmptyCollection() { createCollectionWithNElements(5).forEach(new Processor() { @Override public void process(Object value) { assertNotNull(value); } }); }