TinkerGraph graph = new TinkerGraph();
Vertex a = graph.addVertex(null);
Vertex b = graph.addVertex(null);
Vertex c = graph.addVertex(null);
graph.addEdge(null, a, b, "likes");
graph.addEdge(null, a, c, "hates");
assertThat(GraphUtil.singleAdjacent(a, Direction.OUT, "likes")).isEqualTo(b);
assertThat(GraphUtil.singleAdjacent(a, Direction.OUT, "likes", "other")).isEqualTo(b);
assertThat(GraphUtil.singleAdjacent(a, Direction.OUT, "other")).isNull();
assertThat(GraphUtil.singleAdjacent(a, Direction.IN, "likes")).isNull();