PageableListModel implements IModel<T> { public void setObject(T object) { throw new UnsupportedOperationException("can't set object"); } PageableListModel(int size); abstract T getPageList(int startIndex, int viewSize); void setObject(T object); T getObject(); void setStartIndex(int startIndex, int viewSize); int getStartIndex(); int getViewSize(); int getSize(); void detach(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testSetObjectUnsupported() { exception.expect(UnsupportedOperationException.class); TestModel model = new TestModel(); model.setObject(theList); }