Github user spmallette commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/572#discussion_r106516160
--- Diff:
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/PathRetractionStrategyTest.java
---
@@ -191,6 +200,58 @@ public void doTest() {
{__.V().as("a").optional(bothE().dedup().as("b")).
choose(select("b"), select("a","b"),
project("a").by(select("a"))),
"[[[a, b]], [[a, b]], [[a, b]], [[[a, b]]], [[a,
b]]]", null},
+ {__.V().as("a").out().select("a").program(new
MockVertexProgram(
+ new
HashSet<>(Arrays.asList(TraverserRequirement.LABELED_PATH)))), "[]", null}
});
}
-}
+
+ // do nothing mock vertex program for traverser requirement testing
+ private static class MockVertexProgram implements VertexProgram<Tuple>
{
--- End diff --
can't this be replaced with a mockito mock?
```java
VertexProgram mock = mock(MockVertexProgram.class);
when(mock.getTraverserRequirements()).
thenReturn(new
HashSet<>(Arrays.asList(TraverserRequirement.LABELED_PATH))))
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---