DefaultValueMapTraversal implements ValueMapTraversal { @Override public Stream<Map<String, Object>> stream() { return flow.apply(supplier.get()).toList().stream(); } DefaultValueMapTraversal(Supplier<GraphTraversal<?, ?>> supplier, Function<GraphTraversal<?, ?>,
            GraphTraversal<Vertex, Map<String, Object>>> flow); @Override Stream<Map<String, Object>> stream(); @Override Stream<Map<String, Object>> next(int limit); @Override Map<String, Object> next(); @Override Optional<Map<String, Object>> getSingleResult(); @Override List<Map<String, Object>> getResultList(); @Override long count();  }
@Test public void shouldReturnMapValues() { List<String> names = graphTemplate.getTraversalVertex() .hasLabel(Person.class).valueMap("name") .stream() .map(m -> m.getOrDefault("name", "").toString()).collect(Collectors.toList()); assertThat(names, Matchers.containsInAnyOrder("[Poliana]", "[Otavio]", "[Paulo]")); }