SimpleRootExtension extends AbstractSampleExtension { @ExtensionDefinition(extensionPoint = ExtensionPoint.VERTEX) @ExtensionDescriptor(description = "returns the results of the toString() method on the vertex.") public ExtensionResponse doWorkOnVertex(@RexsterContext Vertex vertex) { return toStringIt(vertex); }  @ExtensionDefinition(extensionPoint = ExtensionPoint.GRAPH) @ExtensionDescriptor(description = "returns the results of the toString() method on the graph.") ExtensionResponse doWorkOnGraph(@RexsterContext Graph graph); @ExtensionDefinition(extensionPoint = ExtensionPoint.EDGE) @ExtensionDescriptor(description = "returns the results of the toString() method on the edge.") ExtensionResponse doWorkOnEdge(@RexsterContext Edge edge); @ExtensionDefinition(extensionPoint = ExtensionPoint.VERTEX) @ExtensionDescriptor(description = "returns the results of the toString() method on the vertex.") ExtensionResponse doWorkOnVertex(@RexsterContext Vertex vertex); static final String EXTENSION_NAME; }
@Test public void doWorkOnVertexValid() { ExtensionResponse response = this.simpleRootExtension.doWorkOnVertex(this.graph.getVertex(1)); doTests(response, "v[1]"); }