//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void testFilteredPathEvaluation()
        internal virtual void TestFilteredPathEvaluation()
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.graphdb.PropertyContainer endNode = mock(org.neo4j.graphdb.Node.class);
            PropertyContainer endNode = mock(typeof(Node));
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.graphdb.PropertyContainer alternativeEndNode = mock(org.neo4j.graphdb.Node.class);
            PropertyContainer alternativeEndNode = mock(typeof(Node));
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.graphdb.Node startNode = mock(org.neo4j.graphdb.Node.class);
            Node            startNode         = mock(typeof(Node));
            Evaluator       evaluator         = mock(typeof(Evaluator));
            TraversalBranch branch            = mock(typeof(TraversalBranch));
            TraversalBranch alternativeBranch = mock(typeof(TraversalBranch));

            when(branch.GetEnumerator()).thenAnswer(new IteratorAnswer(endNode));
            when(alternativeBranch.GetEnumerator()).thenAnswer(new IteratorAnswer(alternativeEndNode));
            when(alternativeBranch.StartNode()).thenReturn(startNode);
            when(evaluator.Evaluate(Mockito.any(typeof(Path)))).thenReturn(Evaluation.INCLUDE_AND_CONTINUE);
            StandardBranchCollisionDetector collisionDetector = new StandardBranchCollisionDetector(evaluator, path => alternativeEndNode.Equals(path.endNode()) && startNode.Equals(path.startNode()));

            ICollection <Path> incoming            = collisionDetector.Evaluate(branch, Direction.INCOMING);
            ICollection <Path> outgoing            = collisionDetector.Evaluate(branch, Direction.OUTGOING);
            ICollection <Path> alternativeIncoming = collisionDetector.Evaluate(alternativeBranch, Direction.INCOMING);
            ICollection <Path> alternativeOutgoing = collisionDetector.Evaluate(alternativeBranch, Direction.OUTGOING);

            assertNull(incoming);
            assertNull(outgoing);
            assertNull(alternativeIncoming);
            assertEquals(1, alternativeOutgoing.Count);
        }
        internal BidirectionalTraversalBranchPath(TraversalBranch start, TraversalBranch end)
        {
            this._start = start;
            this._end   = end;

            // Most used properties: endNode and lastRelationship, so cache them right away (semi-expensive though).
            IEnumerator <PropertyContainer> endPathEntities = end.GetEnumerator();

//JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
            this._endNode = ( Node )endPathEntities.next();
//JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
            this._lastRelationship = endPathEntities.hasNext() ? (Relationship)endPathEntities.next() : start.LastRelationship();
        }