### Question:
CurieAdder implements MethodInterceptor { void addCuries(Graph graph) { for (Vertex vertex: graph.getVertices()) { String iri = (String)vertex.getProperty(CommonProperties.IRI); Optional<String> curie = curieUtil.getCurie(iri); if (curie.isPresent()) { vertex.setProperty(CommonProperties.CURIE, curie.get()); } } }  @Override Object invoke(MethodInvocation invocation);  }### Answer:
@Test public void curiesAreAdded() { Vertex v = graph.addVertex(null); v.setProperty(CommonProperties.IRI, "http: adder.addCuries(graph); assertThat((String)v.getProperty(CommonProperties.CURIE), is("x:foo")); }
@Test public void nonFoundCuriesAreIgnored() { Vertex v = graph.addVertex(null); adder.addCuries(graph); assertThat(v.getPropertyKeys(), not(contains(CommonProperties.CURIE))); }