### Question:
CollisionConstraint { @Override public boolean equals(Object object) { if (this == object) { return true; } if (object == null || object.getClass() != getClass()) { return false; } final CollisionConstraint other = (CollisionConstraint) object; return constraints.equals(other.constraints); } CollisionConstraint(); void add(Orientation orientation, String group); Map<Orientation, Collection<String>> getConstraints(); Collection<String> getConstraints(Orientation orientation); boolean has(Orientation orientation, String group); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString();  }### Answer:
@Test void testEquals() { assertEquals(constraint, constraint); final CollisionConstraint same = new CollisionConstraint(); same.add(Orientation.EAST, "group"); assertEquals(constraint, same); assertNotEquals(constraint, null); assertNotEquals(constraint, new Object()); final CollisionConstraint other = new CollisionConstraint(); other.add(Orientation.NORTH, "group"); assertNotEquals(constraint, other); final CollisionConstraint other2 = new CollisionConstraint(); other2.add(Orientation.EAST, "void"); assertNotEquals(constraint, other2); }