### Question:
Transition { @Override public boolean equals(Object object) { if (this == object) { return true; } if (object == null || object.getClass() != getClass()) { return false; } final Transition other = (Transition) object; return groups.equals(other.groups) && type == other.type || isSymmetric(other); } Transition(TransitionType type, String groupIn, String groupOut); TransitionType getType(); String getIn(); String getOut(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString();  }### Answer:
@Test void testEquals() { final TransitionType type = TransitionType.UP; final Transition transition = new Transition(type, "a", "a"); assertEquals(transition, transition); assertEquals(new Transition(type, "a", "a"), new Transition(type, "a", "a")); assertEquals(new Transition(type, "a", "b"), new Transition(type, "a", "b")); assertEquals(new Transition(TransitionType.CENTER, "a", "b"), new Transition(TransitionType.CENTER.getSymetric(), "b", "a")); assertEquals(new Transition(type, "a", "b"), new Transition(type.getSymetric(), "b", "a")); assertNotEquals(new Transition(type, "a", "a"), null); assertNotEquals(new Transition(type, "a", "a"), new Object()); assertNotEquals(new Transition(type, "a", "b"), new Transition(type, "b", "a")); assertNotEquals(new Transition(type, "a", "b"), new Transition(TransitionType.CENTER, "a", "b")); assertNotEquals(new Transition(type, "a", "b"), new Transition(type, "a", "a")); assertNotEquals(new Transition(type, "a", "b"), new Transition(type, "b", "b")); assertNotEquals(new Transition(type, "a", "a"), new Transition(type, "b", "a")); assertNotEquals(new Transition(type, "a", "a"), new Transition(type, "b", "b")); assertNotEquals(new Transition(type, "a", "a"), new Transition(type.getSymetric(), "b", "b")); }