LibraryInfo implements Parcelable { @Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(libraryId); dest.writeString(libraryName); dest.writeString(folderId); dest.writeString(folderName); } LibraryInfo(@NonNull String libraryId, @Nullable String libraryName,
                       @Nullable String folderId, @Nullable String folderName); LibraryInfo buildUpon(@Nullable String newFolderId, @Nullable String newFolderName); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override int describeContents(); @Override void writeToParcel(Parcel dest, int flags); final String libraryId; final String libraryName; final String folderId; final String folderName; static final Creator<LibraryInfo> CREATOR; }
@Test public void ensureLibraryInfoParcelableWorks() { Parcel parcel = Parcel.obtain(); libraryInfo1.writeToParcel(parcel, 0); parcel.setDataPosition(0); LibraryInfo fromParcel = LibraryInfo.CREATOR.createFromParcel(parcel); assertThat(libraryInfo1).isEqualTo(fromParcel); }