### Question:
TinkerGraphUtil { Vertex addNode(Node node) { Vertex vertex = graph.getVertex(node.getId()); if (null == vertex) { vertex = graph.addVertex(node.getId()); copyProperties(node, vertex); Set<String> labels = new HashSet<>(); for (Label label : node.getLabels()) { labels.add(label.name()); } vertex.setProperty("types", labels); } return vertex; } @Inject  TinkerGraphUtil(CurieUtil curieUtil);  TinkerGraphUtil(Graph graph, CurieUtil curieUtil); CurieUtil getCurieUtil(); Graph getGraph(); void setGraph(Graph graph); Element addElement(PropertyContainer container); void addPath(Iterable<PropertyContainer> path); Element addElement(Element element); void addGraph(Graph addition); Graph combineGraphs(Graph graph2); Graph resultToGraph(Result result); static Optional<T> getProperty(Element container, String property, Class<T> type); static Collection<T> getProperties(Element container, String property, Class<T> type); void project(Collection<String> projection);  }### Answer:
@Test public void idsAreTranslated() { TinkerGraphUtil tgu = new TinkerGraphUtil(graph, curieUtil); Vertex v = tgu.addNode(node); assertThat(v.getId(), is((Object)"0")); }
@Test public void addNodeIsIdempotent() { TinkerGraphUtil tgu = new TinkerGraphUtil(graph, curieUtil); Vertex v1 = tgu.addNode(node); Vertex v2 = tgu.addNode(node); assertThat(v1, is(v2)); }