TraversalExplanation extends AbstractExplanation implements Serializable { public ImmutableExplanation asImmutable() { return new ImmutableExplanation(getOriginalTraversalAsString(), this.getIntermediates().collect(Collectors.toList())); } protected  TraversalExplanation();  TraversalExplanation(final Traversal.Admin<?, ?> traversal); List<Pair<TraversalStrategy, Traversal.Admin<?, ?>>> getStrategyTraversals(); Traversal.Admin<?, ?> getOriginalTraversal(); ImmutableExplanation asImmutable();  }
@Test public void shouldMakeImmutable() { final TraversalExplanation explanation = __.V().out().out().explain(); final ImmutableExplanation immutable = explanation.asImmutable(); assertEquals(explanation.prettyPrint(), immutable.prettyPrint()); assertEquals(explanation.toString(), immutable.toString()); }