DefaultVertexTraversal extends AbstractVertexTraversal implements VertexTraversal { @Override public VertexTraversal hasLabel(String label) { Objects.requireNonNull(label, "label is required"); return new DefaultVertexTraversal(supplier, flow.andThen(g -> g.hasLabel(label)), converter); } DefaultVertexTraversal(Supplier<GraphTraversal<?, ?>> supplier,
                           Function<GraphTraversal<?, ?>, GraphTraversal<Vertex, Vertex>> flow,
                           GraphConverter converter); @Override VertexTraversal has(String propertyKey, Object value); @Override VertexTraversal has(String propertyKey); @Override VertexTraversal has(String propertyKey, P<?> predicate); @Override VertexTraversal has(T accessor, Object value); @Override VertexTraversal has(T accessor, P<?> predicate); @Override VertexTraversal out(String... labels); @Override VertexTraversal filter(Predicate<T> predicate); @Override EdgeTraversal outE(String... edgeLabels); @Override VertexTraversal in(String... labels); @Override EdgeTraversal inE(String... edgeLabels); @Override VertexTraversal both(String... labels); @Override EdgeTraversal bothE(String... edgeLabels); @Override VertexRepeatTraversal repeat(); @Override VertexTraversal limit(long limit); @Override VertexTraversal range(long start, long end); @Override VertexTraversal hasLabel(String label); @Override VertexTraversal hasLabel(Class<T> entityClass); @Override VertexTraversal hasLabel(P<String> predicate); @Override VertexTraversal hasNot(String propertyKey); @Override Optional<T> next(); @Override Stream<T> stream(); @Override Optional<T> getSingleResult(); @Override List<T> getResultList(); @Override Stream<T> next(int limit); @Override ValueMapTraversal valueMap(String... propertyKeys); @Override long count(); @Override VertexTraversalOrder orderBy(String property);  }
@Test public void shouldReturnErrorWhenHasLabelStringNull() { assertThrows(NullPointerException.class, () -> graphTemplate.getTraversalVertex().hasLabel((String) null)); }
@Test public void shouldReturnErrorWhenHasLabelSupplierNull() { assertThrows(NullPointerException.class, () -> graphTemplate.getTraversalVertex().hasLabel((Supplier<String>) null)); }
@Test public void shouldReturnErrorWhenHasLabelEntityClassNull() { assertThrows(NullPointerException.class, () -> graphTemplate.getTraversalVertex().hasLabel((Class<?>) null)); }