### Question:
LinkedListIndexedCollection extends Collection { public int indexOf(Object value) { if (value == null) { return VALUE_NOT_FOUND_RETURN_VALUE; } int index = 0; ListNode current; for (current = first; current != null && !value.equals(current.value); current = current.next) { ++index; } if (current == null || !value.equals(current.value)) { return VALUE_NOT_FOUND_RETURN_VALUE; } return index; } LinkedListIndexedCollection();  LinkedListIndexedCollection(Collection other); @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 testIndexOfWithEmptyCollection() { assertEquals(createCollectionWithNElements(0).indexOf(0), -1); }
@Test void testIndexOfWithNull() { assertEquals(LinkedListIndexedCollection.VALUE_NOT_FOUND_RETURN_VALUE, createCollectionWithNElements(5).indexOf(null)); }