### Question:
ImmutableAppendedList implements List<T> { @Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof List<?>) { List<?> that = (List<?>)obj; if (this.size() != that.size()) return false; Iterator<?> thisIter = this.iterator(); Iterator<?> thatIter = that.iterator(); while (thisIter.hasNext()) { Object thisValue = thisIter.next(); Object thatValue = thatIter.next(); if (thisValue == null) { if (thatValue != null) return false; } else { if (!thisValue.equals(thatValue)) return false; } } return true; } return super.equals(obj); } ImmutableAppendedList( List<T> parent,
                                  T element ); boolean contains( Object o ); boolean containsAll( Collection<?> c ); T get( int index ); int indexOf( Object o ); boolean isEmpty(); @SuppressWarnings( "synthetic-access" ) Iterator<T> iterator(); int lastIndexOf( Object o ); ListIterator<T> listIterator(); @SuppressWarnings( "synthetic-access" ) ListIterator<T> listIterator( final int index ); int size(); List<T> subList( int fromIndex,
                            int toIndex ); Object[] toArray(); @SuppressWarnings( "unchecked" ) X[] toArray( X[] a ); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString(); void add( int index,
                     T element ); boolean add( T o ); boolean addAll( Collection<? extends T> c ); boolean addAll( int index,
                           Collection<? extends T> c ); void clear(); boolean remove( Object o ); T remove( int index ); boolean removeAll( Collection<?> c ); boolean retainAll( Collection<?> c ); T set( int index,
                  T element );  }### Answer:
@Test public void shouldBeEqualToEquivalentArrayList() { List<String> copy = new ArrayList<String>(list); assertThat(list.equals(copy), is(true)); }