Folder implements Bundleable { @Override public int hashCode() { int result = identity != null ? identity.hashCode() : 0; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (parentIdentity != null ? parentIdentity.hashCode() : 0); result = 31 * result + childCount; result = 31 * result + (date != null ? date.hashCode() : 0); return result; } protected  Folder(@NonNull String identity,
                  @NonNull String name,
                  @Nullable String parentIdentity,
                  int childCount,
                  @Nullable String date); @Override String getIdentity(); @Override String getName(); @Override Bundle toBundle(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static Builder builder(); final String identity; final String name; final String parentIdentity; final int childCount; final String date; static BundleCreator<Folder> BUNDLE_CREATOR; }
@Test public void ensureFolderHashCodeWorks() { assertThat(folder1.hashCode()).isEqualTo(folder1_copy.hashCode()); assertThat(folder1.hashCode()).isNotEqualTo(folder2.hashCode()); }