NoteListModel implements Parcelable { public void loadedData(List<Note> notes) { items.addAll(notes); error.set(false); loaded = true; } NoteListModel(); protected  NoteListModel(Parcel in); @Override void writeToParcel(Parcel dest, int flags); @Override int describeContents(); ObservableArrayList<Note> getItems(); ObservableBoolean getError(); void loadedData(List<Note> notes); boolean isLoaded(); void loadedWithError(); void updateItem(Note newNote); static final Creator<NoteListModel> CREATOR; }
@Test public void testParcelable() { NoteListModel model = new NoteListModel(); model.loadedData(Arrays.asList(TestData.note1())); ParcelableTester.check(model, NoteListModel.CREATOR); }