### Question:
ImmutableAppendedList implements List<T> { public T set( int index, T element ) { throw new UnsupportedOperationException(); } 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( expected = UnsupportedOperationException.class ) public void shouldNotAllowSettingElementByIndex() { list.set(0, null); }