AnimeLibraryUpdate implements Parcelable { public void setWatchingStatus(@Nullable final WatchingStatus watchingStatus) { mWatchingStatus = watchingStatus; } AnimeLibraryUpdate(final AnimeDigest digest);  AnimeLibraryUpdate(final AnimeLibraryEntry libraryEntry); private  AnimeLibraryUpdate(final Parcel source); boolean containsModifications(); String getAnimeId(); String getAnimeTitle(); Defaults getDefaults(); int getEpisodesWatched(); @Nullable String getNotes(); @Nullable Rating getRating(); int getRewatchCount(); @Nullable WatchingStatus getWatchingStatus(); boolean isPrivate(); boolean isRewatching(); void setEpisodesWatched(final int episodesWatched); void setNotes(@Nullable String notes); void setPrivacy(final Privacy privacy); void setRating(@Nullable final Rating rating); void setRewatchCount(final int rewatchCount); void setRewatching(final boolean rewatching); void setWatchingStatus(@Nullable final WatchingStatus watchingStatus); JsonObject toJson(); @Override int describeContents(); @Override void writeToParcel(final Parcel dest, final int flags); static final Creator<AnimeLibraryUpdate> CREATOR; }
@Test public void testSetWatchingStatus() throws Exception { assertFalse(mLibraryUpdate.containsModifications()); mLibraryUpdate.setWatchingStatus(mLibraryUpdate.getDefaults().getWatchingStatus()); assertFalse(mLibraryUpdate.containsModifications()); mLibraryUpdate.setWatchingStatus(WatchingStatus.COMPLETED); assertTrue(mLibraryUpdate.containsModifications()); mLibraryUpdate.setWatchingStatus(mLibraryUpdate.getDefaults().getWatchingStatus()); assertFalse(mLibraryUpdate.containsModifications()); mLibraryUpdate.setWatchingStatus(WatchingStatus.ON_HOLD); assertTrue(mLibraryUpdate.containsModifications()); }