TagGroupsMutation implements JsonSerializable { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TagGroupsMutation mutation = (TagGroupsMutation) o; if (addTags != null ? !addTags.equals(mutation.addTags) : mutation.addTags != null) return false; if (removeTags != null ? !removeTags.equals(mutation.removeTags) : mutation.removeTags != null) return false; return setTags != null ? setTags.equals(mutation.setTags) : mutation.setTags == null; } private  TagGroupsMutation(@Nullable Map<String, Set<String>> addTags, @Nullable Map<String, Set<String>> removeTags, @Nullable Map<String, Set<String>> setTags); @NonNull static TagGroupsMutation newAddTagsMutation(@NonNull String group, @NonNull Set<String> tags); @NonNull static TagGroupsMutation newRemoveTagsMutation(@NonNull String group, @NonNull Set<String> tags); @NonNull static TagGroupsMutation newSetTagsMutation(@NonNull String group, @NonNull Set<String> tags); @NonNull @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) static List<TagGroupsMutation> collapseMutations(@Nullable List<TagGroupsMutation> mutations); @NonNull @Override JsonValue toJsonValue(); @NonNull static TagGroupsMutation fromJsonValue(@NonNull JsonValue jsonValue); @NonNull static List<TagGroupsMutation> fromJsonList(@NonNull JsonList jsonList); @Override boolean equals(Object o); @Override int hashCode(); void apply(@NonNull Map<String, Set<String>> tagGroups);  }
@Test public void testEquals() { final TagGroupsMutation mutation = TagGroupsMutation.newAddTagsMutation("group", new HashSet<>(Arrays.asList("tag1", "tag2"))); final TagGroupsMutation sameMutation = TagGroupsMutation.newAddTagsMutation("group", new TreeSet<>(Arrays.asList("tag1", "tag2"))); final TagGroupsMutation differentMutation = TagGroupsMutation.newSetTagsMutation("group", tagSet("tag3")); assertEquals(mutation, sameMutation); assertNotSame(mutation, differentMutation); assertEquals(mutation, TagGroupsMutation.fromJsonValue(mutation.toJsonValue())); }