### Question:
Transition { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + groups.hashCode(); result = prime * result + type.hashCode(); return result; } 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 testHashCode() { final TransitionType type = TransitionType.UP; final Transition transition = new Transition(type, "a", "a"); assertHashEquals(transition, transition); assertHashEquals(new Transition(type, "a", "a"), new Transition(type, "a", "a")); assertHashEquals(new Transition(type, "a", "b"), new Transition(type, "a", "b")); assertHashNotEquals(new Transition(TransitionType.CENTER, "a", "b"), new Transition(TransitionType.CENTER.getSymetric(), "b", "a")); assertHashNotEquals(new Transition(type, "a", "b"), new Transition(type.getSymetric(), "b", "a")); assertHashNotEquals(new Transition(type, "a", "a"), new Object()); assertHashNotEquals(new Transition(type, "a", "b"), new Transition(TransitionType.CENTER, "b", "a")); assertHashNotEquals(new Transition(type, "a", "b"), new Transition(TransitionType.CENTER, "a", "b")); assertHashNotEquals(new Transition(type, "a", "b"), new Transition(type, "a", "a")); assertHashNotEquals(new Transition(type, "a", "b"), new Transition(type, "b", "b")); assertHashNotEquals(new Transition(type, "a", "a"), new Transition(type, "b", "a")); assertHashNotEquals(new Transition(type, "a", "a"), new Transition(type, "b", "b")); assertHashNotEquals(new Transition(type, "a", "a"), new Transition(type.getSymetric(), "b", "b")); }