### Question:
RelationshipUtils { public static Relationship getSingleRelationship(Node node1, Node node2, RelationshipType type, Direction direction) { Relationship result = getSingleRelationshipOrNull(node1, node2, type, direction); if (result == null) { throw new NotFoundException("Relationship between " + node1 + " and " + node2 + " of type " + type + " and direction " + direction + " does not exist."); } return result; } private  RelationshipUtils(); static Relationship getSingleRelationship(Node node1, Node node2, RelationshipType type, Direction direction); static Relationship getSingleRelationshipOrNull(Node node1, Node node2, RelationshipType type, Direction direction); static boolean relationshipNotExists(Node node1, Node node2, RelationshipType type, Direction direction); static boolean relationshipExists(Node node1, Node node2, RelationshipType type, Direction direction); static void deleteRelationshipIfExists(Node node1, Node node2, RelationshipType type, Direction direction); static Relationship createRelationshipIfNotExists(Node node1, Node node2, RelationshipType type, Direction direction);  }### Answer:
@Test(expected = NotFoundException.class) public void nonExistingRelationshipShouldBeCorrectlyIdentified2() { try (Transaction tx = database.beginTx()) { Node node1 = database.getNodeById(0); Node node2 = database.getNodeById(1); getSingleRelationship(node2, node1, withName("IDONTEXIST"), INCOMING); tx.success(); } }