NodeVector implements java.util.List<NODE> { public void add(int index, NODE element) { throw e; }  int length(); void add(int index, NODE element); boolean add(NODE o); boolean addAll(Collection<? extends NODE> c); boolean addAll(int index, Collection<? extends NODE> c); void clear(); NODE remove(int index); boolean remove(Object o); boolean removeAll(Collection<?> c); boolean retainAll(Collection<?> c); NODE set(int index, NODE element); boolean contains(Object o); boolean containsAll(Collection<?> c); @Override boolean equals(Object o); @Override int hashCode(); @SuppressWarnings("unchecked") NODE get(int index); int indexOf(Object o); boolean isEmpty(); Iterator<NODE> iterator(); int lastIndexOf(Object o); ListIterator<NODE> listIterator(); ListIterator<NODE> listIterator(int index); int size(); List<NODE> subList(int fromIndex, int toIndex); Object[] toArray(); T[] toArray(T[] a);  }
@Test(expected = NodeVector.ReadOnlyException.class) public void require_that_add_throws_exception() { new TestNodeVector("foo").add(barNode()); }
@Test(expected = NodeVector.ReadOnlyException.class) public void require_that_addindex_throws_exception() { new TestNodeVector("foo").add(0, barNode()); }