ObservedList implements Iterable<T> { public void push(T item) { add(0, item); }  void setObserver(ListObserver observer); Iterator<T> iterator(); boolean isEmpty(); int size(); T get(int index); void push(T item); void add(int index, T item); void set(int index, T item); void change(int index); boolean hasId(Id id); void changeById(final Id id); T remove(int index); static final int NOT_FOUND; }
@Test public void addFailsWithNoObserver() throws Exception { mThrown.expect(IllegalStateException.class); mThrown.expectMessage("No observer for add"); mList.push(THING0); }