@Test public void testChildMoveEvent_equals_previousChildName() { ChildMoveEvent a = ChildMoveEvent.create(mockDataSnapshot1, "foo"); ChildMoveEvent b = ChildMoveEvent.create(mockDataSnapshot1, "foo"); ChildMoveEvent c = ChildMoveEvent.create(mockDataSnapshot1, "bar"); ChildMoveEvent d = ChildMoveEvent.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();  }