@Test public void testChildChangeEvent_equals_previousChildName() { ChildChangeEvent a = ChildChangeEvent.create(mockDataSnapshot1, "foo"); ChildChangeEvent b = ChildChangeEvent.create(mockDataSnapshot1, "foo"); ChildChangeEvent c = ChildChangeEvent.create(mockDataSnapshot1, "bar"); ChildChangeEvent d = ChildChangeEvent.create(mockDataSnapshot1, null); assertThat(a) .isEqualTo(b) .isNotEqualTo(c) .isNotEqualTo(d); assertThat(a.hashCode()) .isEqualTo(b.hashCode()) .isNotEqualTo(c.hashCode()) .isNotEqualTo(d.hashCode()); }
@Override public int hashCode() { return dataSnapshot.hashCode(); }
ChildEvent { @Override public int hashCode() { return dataSnapshot.hashCode(); } }
ChildEvent { @Override public int hashCode() { return dataSnapshot.hashCode(); } ChildEvent(DataSnapshot dataSnapshot); }
ChildEvent { @Override public int hashCode() { return dataSnapshot.hashCode(); } ChildEvent(DataSnapshot dataSnapshot); @NonNull DataSnapshot dataSnapshot(); @Override boolean equals(Object o); @Override int hashCode(); }
ChildEvent { @Override public int hashCode() { return dataSnapshot.hashCode(); } ChildEvent(DataSnapshot dataSnapshot); @NonNull DataSnapshot dataSnapshot(); @Override boolean equals(Object o); @Override int hashCode();  }