SimpleRootExtension extends AbstractSampleExtension { @ExtensionDefinition(extensionPoint = ExtensionPoint.EDGE) @ExtensionDescriptor(description = "returns the results of the toString() method on the edge.") public ExtensionResponse doWorkOnEdge(@RexsterContext Edge edge) { return toStringIt(edge); }  @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 doWorkOnEdgeValid() { ExtensionResponse response = this.simpleRootExtension.doWorkOnEdge(this.graph.getEdge(11)); doTests(response, "e[11][4-created->3]"); }