### Question:
Change { @SuppressWarnings("RedundantIfStatement") @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Change change = (Change) o; if (!current.equals(change.current)) return false; if (!previous.equals(change.previous)) return false; return true; } Change(T previous, T current); T getPrevious(); T getCurrent(); @SuppressWarnings("RedundantIfStatement") @Override boolean equals(Object o); @Override int hashCode(); static Map<Long, Change<T>> changesToMap(Collection<Change<T>> changes);  }### Answer:
@Test public void equalChangesShouldBeEqual() { try (Transaction tx = database.beginTx()) { Change<Node> nodeChange1 = new Change<>(database.getNodeById(0), database.getNodeById(0)); Change<Node> nodeChange2 = new Change<>(database.getNodeById(0), database.getNodeById(0)); Change<Node> nodeChange3 = new Change<>(database.getNodeById(1), database.getNodeById(1)); assertTrue(nodeChange1.equals(nodeChange2)); assertTrue(nodeChange2.equals(nodeChange1)); assertFalse(nodeChange3.equals(nodeChange1)); assertFalse(nodeChange1.equals(nodeChange3)); } }