### Question:
CollisionCouple { @Override public boolean equals(Object object) { if (this == object) { return true; } if (object == null || object.getClass() != getClass()) { return false; } final CollisionCouple other = (CollisionCouple) object; return with.equals(other.with) && by.equals(other.by); } CollisionCouple(Collision with, Collision by); Collision getWith(); Collision getBy(); @Override int hashCode(); @Override boolean equals(Object object);  }### Answer:
@Test void testEquals() { final Collision with = new Collision("with", 1, 2, 3, 4, true); final Collision by = new Collision("by", 1, 2, 3, 4, true); final CollisionCouple couple = new CollisionCouple(with, by); assertEquals(couple, couple); assertEquals(couple, new CollisionCouple(with, by)); assertNotEquals(couple, null); assertNotEquals(couple, new Object()); assertNotEquals(couple, new CollisionCouple(with, with)); assertNotEquals(couple, new CollisionCouple(by, with)); }