AddVertexStep extends ScalarMapStep<S, Vertex> implements Mutating<Event.VertexAddedEvent>, TraversalParent, Scoping { @Override public Parameters getParameters() { return this.parameters; } AddVertexStep(final Traversal.Admin traversal, final String label);  AddVertexStep(final Traversal.Admin traversal, final Traversal.Admin<S,String> vertexLabelTraversal); @Override Parameters getParameters(); @Override Set<String> getScopeKeys(); @Override List<Traversal.Admin<S, E>> getLocalChildren(); @Override void configure(final Object... keyValues); @Override CallbackRegistry<Event.VertexAddedEvent> getMutatingCallbackRegistry(); @Override int hashCode(); @Override Set<TraverserRequirement> getRequirements(); @Override String toString(); @Override void setTraversal(final Traversal.Admin<?, ?> parentTraversal); @Override AddVertexStep<S> clone();  }
@Test public void shouldDefaultTheLabelIfNullString() { final Traversal.Admin t = mock(Traversal.Admin.class); when(t.getTraverserSetSupplier()).thenReturn(TraverserSetSupplier.instance()); final AddVertexStartStep starStep = new AddVertexStartStep(t, (String) null); assertEquals(Vertex.DEFAULT_LABEL, starStep.getParameters().getRaw().get(T.label).get(0)); final AddVertexStep step = new AddVertexStep(t, (String) null); assertEquals(Vertex.DEFAULT_LABEL, starStep.getParameters().getRaw().get(T.label).get(0)); }
@Test public void shouldDefaultTheLabelIfNullTraversal() { final Traversal.Admin t = mock(Traversal.Admin.class); when(t.getTraverserSetSupplier()).thenReturn(TraverserSetSupplier.instance()); final AddVertexStartStep starStep = new AddVertexStartStep(t, (Traversal<?,String>) null); assertEquals(Vertex.DEFAULT_LABEL, starStep.getParameters().getRaw().get(T.label).get(0)); final AddVertexStep step = new AddVertexStep(t, (String) null); assertEquals(Vertex.DEFAULT_LABEL, starStep.getParameters().getRaw().get(T.label).get(0)); }