### Question:
DirectionUtils { public static Direction reverse(Direction direction) { switch (direction) { case BOTH: return BOTH; case OUTGOING: return INCOMING; case INCOMING: return OUTGOING; default: throw new IllegalArgumentException("Unknown direction " + direction); } } private  DirectionUtils(); static Direction resolveDirection(Relationship relationship, Node pointOfView); static Direction resolveDirection(Relationship relationship, Node pointOfView, Direction defaultDirection); static Direction resolveDirection(AttachedRelationshipExpressions<?> relationship, AttachedNodeExpressions pointOfView, Direction defaultDirection); static boolean matches(Relationship relationship, Node pointOfView, Direction direction); static boolean matches(Direction direction1, Direction direction2); static Direction reverse(Direction direction);  }### Answer:
@Test public void shouldCorrectlyReverseDirection() { assertEquals(OUTGOING, reverse(INCOMING)); assertEquals(INCOMING, reverse(OUTGOING)); assertEquals(BOTH, reverse(BOTH)); }