### Question:
ObservedList implements Iterable<T> { public void set(int index, T item) { if (mObserver == null) { throw unobserved("set"); } list.set(index, item); mObserver.notifyItemChanged(index); }  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; }### Answer:
@Test public void setFailsWithNoObserver() throws Exception { mThrown.expect(IllegalStateException.class); mThrown.expectMessage("No observer for set"); mList.set(0, THING1); }